🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

lighting-plugin-proxy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lighting-plugin-proxy - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+11
-5
index.js

@@ -19,4 +19,4 @@ let version = require('./package.json').version;

build:function (light,cb) {
// get proxy config
if(light.config.pluginConfig && light.config.pluginConfig.proxy){
if (light.config.pluginConfig && light.config.pluginConfig.proxy) {
let config = light.config.pluginConfig.proxy

@@ -27,6 +27,12 @@

//对每一个proxyMap进行配置
Object.keys(config).forEach(key=>{
let r = proxyMiddleware(key, {target: config[key], changeOrigin: true});
Object.keys(config).forEach(key => {
//136183 支持自定义proxy配置
let proxyOpts;
if (typeof (config[key]) === "string") {
proxyOpts = { target: config[key], changeOrigin: true }
} else {
proxyOpts = config[key];
}
let r = proxyMiddleware(key, proxyOpts);
global.middleware.push(r);

@@ -33,0 +39,0 @@ })

{
"name": "lighting-plugin-proxy",
"main": "index.js",
"version": "1.0.0",
"version": "1.0.1",
"dependencies": {

@@ -6,0 +6,0 @@ "http-proxy-middleware": "^0.19.1"