Skip to content

Commit a2f3123

Browse files
committed
fix(vite): remove unnecessary rewrite rule in API proxy configuration
- Simplified the API proxy configuration in vite.config.js by removing the rewrite rule for the '/api' path, maintaining the changeOrigin setting for proper request handling.
1 parent 496fe0a commit a2f3123

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

frontend/vite.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ export default defineConfig(({ mode }) => {
1515
'/api': {
1616
// 避免 Windows 下优先解析 ::1 导致 IPv6 拒绝连接
1717
target: apiTarget,
18-
changeOrigin: true,
19-
rewrite: (path) => path.replace(/^\/api/, '')
18+
changeOrigin: true
2019
}
2120
}
2221
},

0 commit comments

Comments
 (0)