perf: 修改代理localhost为127.0.0.1以适配部分设备解析localhost异常的问题

This commit is contained in:
insistence
2024-06-28 14:31:22 +08:00
parent 43f903c6e0
commit 2cf5268f7d

View File

@@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://localhost:9099',
target: 'http://127.0.0.1:9099',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}