跨域问题导致资源不能访问:No 'Access-Control-Allow-Origin' header is present on the requested resource.
警告
本文最后更新于 2020-05-30 17:09,文中内容可能已过时。
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”
请我喝杯水

