🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

rollup-plugin-express-proxy

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-express-proxy - npm Package Compare versions

Comparing version

to
1.0.4

2

package.json
{
"name": "rollup-plugin-express-proxy",
"version": "1.0.3",
"version": "1.0.4",
"description": "rollup http server plugin, support http proxy.",

@@ -5,0 +5,0 @@ "main": "dist/bundle.js",

@@ -33,3 +33,3 @@ import { resolve, posix } from 'path';

let proxies = Object.keys(options.proxy).map(function (proxy) {
let proxies = Object.keys(options.proxy || {}).map(function (proxy) {
if (typeof options.proxy[proxy] === "string") {

@@ -36,0 +36,0 @@ return {

const serve = require("../dist/bundle");
const path = require("path");
console.log(233)
serve({

@@ -8,11 +7,11 @@ port: 18080,

proxy: {
"gismanage": {
destination: "http://192.168.1.172:7049/",
"api": {
destination: "http://baidu.com/",
forwardPath: function (req, res) {
console.log(req)
return "/gismanage" + require('url').parse(req.url).path;
return "/api" + require('url').parse(req.url).path;
},
test: "/gismanage"
test: "/api"
},
}
});