|
|
|
@ -43,11 +43,11 @@ const baseCfg = (viteEnv = {}) => { |
|
|
|
cors: true, |
|
|
|
proxy: { |
|
|
|
//适配外网的测试环境临时使用
|
|
|
|
'/efcode20-enf-app/api/enf-ep': { |
|
|
|
target: VITE_PROXY_TARGET || 'http://localhost:17000', |
|
|
|
changeOrigin: true, |
|
|
|
rewrite: (path) => path.replace(/^\/efcode20-enf-app\/api\/enf-ep/, ''), |
|
|
|
}, |
|
|
|
// '/efcode20-enf-app/api/enf-ep': {
|
|
|
|
// target: VITE_PROXY_TARGET || 'http://localhost:17000',
|
|
|
|
// changeOrigin: true,
|
|
|
|
// rewrite: (path) => path.replace(/^\/efcode20-enf-app\/api\/enf-ep/, ''),
|
|
|
|
// },
|
|
|
|
'/efcode20-enf-app/api': { |
|
|
|
target: VITE_PROXY_TARGET || 'http://localhost:17000', |
|
|
|
changeOrigin: true, |
|
|
|
@ -55,7 +55,12 @@ const baseCfg = (viteEnv = {}) => { |
|
|
|
}, |
|
|
|
'/profile': { |
|
|
|
target: VITE_PROXY_TARGET || 'http://139.186.148.21:8080', |
|
|
|
rewrite: (path) => path.replace(/^\/profile/, '/ent-ep/profile'), |
|
|
|
rewrite: (path) => { |
|
|
|
if (VITE_BASE_URL.includes('enf-ep')) { |
|
|
|
return path.replace(/^\/profile/, '/enf-ep/profile'); |
|
|
|
} |
|
|
|
return path.replace(/^\/profile/, '/profile') |
|
|
|
}, |
|
|
|
changeOrigin: true, |
|
|
|
} |
|
|
|
} |
|
|
|
|