一.问题发现
报错内容:
p://localhost:8001/user/login’ from origin ‘http://localhost:3001’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Credentials’ header in the response is ‘’ which must be ‘true’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
前后端分离项目:
前端:Vue3-Element-Admin
后端:SpringCloud
后端接口已写好,用postman检测正常。
但是在搭建好前端项目后,进行数据传输时报错: