Просмотр исходного кода

fix(config): 新增允许携带凭证的接口域名

在请求拦截器的跨域凭证白名单中添加了yjsredis.cocorobo.cn域名,修正该接口的请求凭证携带逻辑
lsc 1 неделя назад
Родитель
Сommit
7fac6ef381
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/services/config.ts

+ 1 - 1
src/services/config.ts

@@ -17,7 +17,7 @@ instance.interceptors.request.use(
     // 确保每个请求都带上cookie
     config.withCredentials = true
 
-    if (url.includes('https://gpt4.cocorobo.cn') || url.includes('https://appapi.cocorobo.cn') || url.includes('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn')) {
+    if (url.includes('https://yjsredis.cocorobo.cn/') || url.includes('https://gpt4.cocorobo.cn') || url.includes('https://appapi.cocorobo.cn') || url.includes('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn')) {
       config.withCredentials = false 
     }