跨域问题导致资源不能访问:No 'Access-Control-Allow-Origin' header is present on the requested resource.

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'xxxxx' is therefore not allowed access.

不同web应用可参考如下内容:

apache:https://enable-cors.org/server_apache.html

nginx:https://enable-cors.org/server_nginx.html

 

修改apache配置文件

<Directory "xxxx">在此行下面添加如下内容

Header set Access-Control-Allow-Origin "*"

or

Header set Access-Control-Allow-Origin "http://www.soulchild.cn"

发表新评论