feat: api
This commit is contained in:
@@ -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/, ""),
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user