当前位置:首页 > 跨域请求报错 No Access-Control-Allow-Origin header is present on the requested resource.

跨域请求报错 No Access-Control-Allow-Origin header is present on the requested resource.

点击次数:276  更新日期:2019-09-01

跨域请求,浏览器提示

Access to XMLHttpRequest at 'xxx1' from origin 'xxx2 has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

解决方法为:

添加header

Access-Control-Allow-Origin:
*