rollup-plugin-express-proxy
Advanced tools
Comparing version
{ | ||
"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" | ||
}, | ||
} | ||
}); |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
9253
-0.42%187
-0.53%