Files
vue-template-h5/proxy.config.js
T
2021-12-07 21:43:10 +08:00

43 lines
736 B
JavaScript

// 代理环境,1测试环境,2生产环境
const VUE_APP_PROXY = process.env.VUE_APP_PROXY
? parseInt(process.env.VUE_APP_PROXY)
: 1;
let target = "";
switch (VUE_APP_PROXY) {
case 1:
target = "http://test.haloapp.vip";
break;
case 2:
target = "http://haloapp.vip";
break;
default:
target = "http://test.haloapp.vip";
}
let proxyTable = {
"/zuul": {
target: target,
changeOrigin: true,
secure: false,
},
"/sjht": {
target: target,
changeOrigin: true,
secure: false,
},
"/media/": {
target: target,
changeOrigin: true,
secure: false,
},
"/bzdb": {
target: target,
changeOrigin: true,
secure: false,
},
};
module.exports = proxyTable;