fix: update vite proxy target to 127.0.0.1 for better compatibility

This commit is contained in:
MerCry 2026-03-05 20:35:43 +08:00
parent c8ba649079
commit e69fab7bb2
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export default defineConfig({
port: 3000, port: 3000,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:8000', target: 'http://127.0.0.1:8000',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),
}, },