fix: 更新Vite配置中的API和WebSocket目标地址,确保本地开发环境正常连接

This commit is contained in:
xudan 2025-06-19 14:07:08 +08:00
parent d7305130e6
commit 534befd88b

View File

@ -45,12 +45,12 @@ export default ({ mode }: Record<string, unknown>) =>
proxy: {
'/mocks/': { target: 'http://localhost:8888/web-amr' },
'/api/': {
target: 'http://82.156.39.91:18080/jeecg-boot',
target: 'http://192.168.189.206:8080/jeecg-boot',
rewrite: (path) => path.replace(/^\/api/, ''),
changeOrigin: true,
},
'/ws/': {
target: 'ws://82.156.39.91:18080/jeecg-boot',
target: 'ws://192.168.189.206:8080/jeecg-boot',
rewrite: (path) => path.replace(/^\/ws/, ''),
changeOrigin: true,
ws: true,