fix: 修复开发环境登录后无法获取cookie的问题
- 为 /api/action 和 /api/data 代理添加 cookieDomainRewrite 和 cookiePathRewrite 配置 - 将 secure 设置为 false 以支持开发环境的证书验证 - 确保后端返回的 cookie 能在开发服务器正确传递和保存
This commit is contained in:
parent
d0835a1eb2
commit
eb70a0c6f6
@ -68,12 +68,16 @@ export default defineConfig(({ mode, command }) => {
|
||||
'/api/action': {
|
||||
target: JCLOUD_URL,
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
secure: false,
|
||||
cookieDomainRewrite: { '*': '' },
|
||||
cookiePathRewrite: { '*': '/' },
|
||||
},
|
||||
'/api/data': {
|
||||
target: JCLOUD_URL,
|
||||
changeOrigin: true,
|
||||
secure: true,
|
||||
secure: false,
|
||||
cookieDomainRewrite: { '*': '' },
|
||||
cookiePathRewrite: { '*': '/' },
|
||||
},
|
||||
'/api/v1/tools': {
|
||||
target: BACKEND_URL,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user