This commit is contained in:
2026-09-29 17:56:03 +08:00
parent ffbe3480a8
commit a427aca5c3
19 changed files with 219 additions and 221 deletions
-11
View File
@@ -8,7 +8,6 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const proxyTarget = process.env.API_PROXY_TARGET || env.API_PROXY_TARGET || 'http://127.0.0.1:9000'
const overseasProxyTarget = process.env.OVERSEAS_API_PROXY_TARGET || env.OVERSEAS_API_PROXY_TARGET || 'http://127.0.0.1:9300'
return {
cacheDir: 'tmp/vite-cache',
@@ -40,16 +39,6 @@ export default defineConfig(({ mode }) => {
})
},
},
'/overseas-api': {
target: overseasProxyTarget,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/overseas-api/, '/api'),
configure(proxy) {
proxy.on('proxyReq', (proxyRequest) => {
proxyRequest.removeHeader('origin')
})
},
},
},
},
}