问题
The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by t...
原因
前端配置了withCredentials=true
解决办法
后端配置Access-Control-Allow-Origin
不能为*
, 必须是相应地址
后端需配置Access-Control-Allow-Credentials
后端需要配置Access-Control-Allow-Headers
为对应的请求头集合
- Post link: https://www.godhearing.cn/cors-kua-yu-wen-ti/
- Copyright Notice: All articles in this blog are licensed under unless otherwise stated.