VUE3项目,后端是thinkphp。 现在想在页面上显示一个由thinkphp生成的验证码,使用axios跨域来请求这个验证码接口。 现在是验证码图片已经可以显示了,但是就是获取不到请求验证码时服务器生成的sessionID。但是在浏览器F12网络中,可以看到有set-Cookie;就是在axios返回值中没有这项,axios跨域已经设置了,withCredentials也设置为true了。 axios跨域设置: .... server: { proxy: { '/api': { target: 'https://***.cn', // 目标后端服务器地址 changeOrigin: true, // 是否改变源地址 secure: true, // 是否启用https协议 withCredentials: true, // 是否携带cookie pathRewrite: { '^/api': '', // 重写路径 }, }, }, ..... 验证码页面 .... initCaptcha() { this.$http.get('https://***.cn/api/Validate/verify_code').then(response => { console.log(response); this.setSession(response.header); //this.onRefresh(); }) }, .... 从console.log的结果来看,没有找到set-cookie项  但是在F12“网络”项中,能看到有这个项  查了一圈搜索后发现axios不支持跨域携带cookie,但是我上面已经对axios做了设置。为何在请求返回中还是拿不到这个?