Files
luckyrun/proxy.config.js
2023-04-23 01:13:23 +08:00

28 lines
512 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://apibeta.haloapp.vip";
break;
case 2:
target = "https://api.xingyuwenhua.com.cn";
break;
default:
target = "https://api.xingyuwenhua.com.cn";
}
let proxyTable = {
"/api": {
target: target,
changeOrigin: true,
secure: false
}
};
module.exports = proxyTable;