chore(config): 更新开发环境API代理目标端口
- 将代理目标从 localhost:18082 更改为 localhost:18080 - 保持环境变量 VITE_API_PROXY 的优先级配置
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: sjjh
|
* @Author: sjjh
|
||||||
* @Date: 2025-04-09 09:33:35
|
* @Date: 2025-04-09 09:33:35
|
||||||
* @Description:
|
* @Description:
|
||||||
@@ -41,7 +41,7 @@ export default defineConfig(({ mode, command }) => {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
'/dev-api': {
|
'/dev-api': {
|
||||||
target: process.env.VITE_API_PROXY || 'http://localhost:18082/healthlink-his',
|
target: process.env.VITE_API_PROXY || 'http://localhost:18080/healthlink-his',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, ''),
|
rewrite: (p) => p.replace(/^\/dev-api/, ''),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user