Skip to content

Commit 2f7fac9

Browse files
committed
修复axios 实例没有全局设置 withCredentials
1 parent c636c8d commit 2f7fac9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

frontend/lib/axios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Http {
4545
headers: {
4646
'Content-Type': 'application/json',
4747
},
48+
withCredentials: true, // 允许跨域请求携带 cookie
4849
});
4950

5051
this.setupInterceptors();

0 commit comments

Comments
 (0)