跨域问题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 属性

上面说到,CORS请求默认不发送Cookie和HTTP认证信息。如果要把Cookie发到服务器,一方面要服务器同意,指定Access-Control-Allow-Credentials字段。

 

出现这个报错信息很可能是你在前端设置了withCredentials = true;你可以去掉这个设置也可以参考下面两个博客

https://juejin.im/post/5c2490ba6fb9a049ff4e2eca

https://blog.csdn.net/nlldwbiqjs/article/details/82887180

 https://ningyu1.github.io/site/post/92-cors-ajax/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM