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

☆樱花仙子☆ 提交于 2019-11-30 12:21:37

withCredentials 属性

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

 

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

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

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

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!