后台:修复
This commit is contained in:
@@ -77,8 +77,8 @@ export default (appInfo: EggAppInfo) => {
|
||||
};
|
||||
|
||||
let regions = [ // 大区数据
|
||||
{ id: 1, env: 'stable', name: "常山少年", domain: 'http://pinus_gm_test.trgame.cn' },
|
||||
{ id: 2, env: 'alpha', name: "测试服", domain: 'http://zyz_gm.trgame.cn' },
|
||||
{ id: 1, env: 'stable', name: "常山少年", domain: 'http://zyz_gm.trgame.cn' },
|
||||
{ id: 2, env: 'alpha', name: "测试服", domain: 'http://pinus_gm_test.trgame.cn' },
|
||||
{ id: 3, env: 'dev', name: "开发服", domain: 'http://zyzdev_gm.trgame.cn' }
|
||||
];
|
||||
config.regions = regions;
|
||||
@@ -94,6 +94,15 @@ export default (appInfo: EggAppInfo) => {
|
||||
return path.replace(`/api/${env}`, '/api')
|
||||
}
|
||||
}
|
||||
httpProxy[`/web/${env}`] = {
|
||||
target: domain,
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
pathRewrite: function(path) {
|
||||
console.log('proxy', path, path.replace(`/web/${env}`, '/web'))
|
||||
return path.replace(`/web/${env}`, '/web')
|
||||
}
|
||||
}
|
||||
}
|
||||
config.proxy = httpProxy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user