工作中经常会遇到 No ‘Access-Control-Allow-Origin’ header is present on the requested resource 这样的跨域错误,此时需要给Nginx服务器配置响应的header参数:
一般解决方案
修改nginx配置文件:
1 | location / { |
工作中经常会遇到 No ‘Access-Control-Allow-Origin’ header is present on the requested resource 这样的跨域错误,此时需要给Nginx服务器配置响应的header参数:
修改nginx配置文件:
1 | location / { |
今天是愚人节,在这一天开通博客的确是个值得纪念的日子,从事技术这么多年感觉还是需要有个小树洞藏点私货,如果你不小心发现了这个博客,很高兴遇到你!