changeOrigin: true,
pathRewrite: {
['^/' + process.env.VUE_APP_BASE_API]: ''
},
headers:{
//改写Origin,注意结尾不含 /
Origin:"http://112.28.109.249:9997",
//改写Referer
Referer:"http://112.28.109.249:9997/",
Host:"112.28.109.249:9997",
cookie: "SESSION=c72b4857-af89-45f7-973d-8b8e5479d053"
},
"onProxyReq": (request, req, res) => {
//移除x-forwarded相关header
request.removeHeader('x-forwarded-host');
request.removeHeader('x-forwarded-proto');
request.removeHeader('x-forwarded-port');
request.removeHeader('x-forwarded-for');
}