Access to XMLHttpRequest at 'XXX' from origin 'XX' has been blocked by CORS policy:

Posted Decade。

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Access to XMLHttpRequest at 'XXX' from origin 'XX' has been blocked by CORS policy: 相关的知识,希望对你有一定的参考价值。

今天出现了一个问题找了好久先看代码:

 

这可能是个BUG吧插入代码:

 dataType: \'jsonp\',  
 crossDomain: true,  

最终:

 

以上是关于Access to XMLHttpRequest at 'XXX' from origin 'XX' has been blocked by CORS policy: 的主要内容,如果未能解决你的问题,请参考以下文章

跨域请求Access to XMLHttpRequest at 'http://localhost/index.php/api/user/login'

Access to XMLHttpRequest at ‘http://localhost:8181/book/findAll‘ from origin ‘http://localhost:8080‘

Access to XMLHttpRequest at 'http://127.0.0.1:8000/XXXXX' from origin 'http://localhost

Access to XMLHttpRequest at 'XXX' from origin 'XX' has been blocked by CORS policy:

ElementUI项目请求SpringBoot后台项目时提示:Access to XMLHttpRequest at **from origin ** has been blocked by CORS

解决跨域Access to XMLHttpRequest at ‘http://localhost:8080/xxx’ from origin ‘http://localhost:63342