跨域問題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