feat: api

This commit is contained in:
skytek_xinliang
2026-08-17 15:02:16 +08:00
parent 332d00db75
commit 6d9f8df725
14 changed files with 1319 additions and 205 deletions
+4
View File
@@ -39,6 +39,10 @@ export default defineConfig(({ mode }) => {
"/api": {
target: apiProxyTarget,
changeOrigin: true,
// 後端登入回應的 HttpOnly Cookie 需由瀏覽器保存為 localhost Cookie。
// 否則後端若帶有內網 Domain 或 /service 路徑,後續 /api 請求不會攜帶登入狀態。
cookieDomainRewrite: "",
cookiePathRewrite: "/",
rewrite: (path: string) => path.replace(/^\/api/, ""),
},
}