fix: Vite dev server 配置 API 代理,解决 405 Method Not Allowed

This commit is contained in:
2026-07-10 14:23:57 +08:00
parent 83f67936c8
commit 5ead280df0

View File

@@ -5,5 +5,11 @@ export default defineConfig({
plugins: [vue()], plugins: [vue()],
server: { server: {
port: 5173, port: 5173,
proxy: {
"/api": {
target: "http://backend:8100",
changeOrigin: true,
},
},
}, },
}); });