背景:
困扰了好几个小时的问题。
启动项目后,页面内容如论如何都不出现,接口没有请求成功。看了一下控制台报了下面错误。
Access to XMLHttpRequest at 'xxx' from origin 'xxx' has been blocked by CORS policy:
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 the XMLHttpRequest
is controlled by the withCredentials attribute.