运行浏览器检查,发现报了4个错:
No 'Access-Control-Allow-Origin' header is present on the requested resource....将下面代码插入到域名所在server配置下
location / {
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header...'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST,...,Origin,Keep-Alive,User-Agent,X-Mx-ReqToken,X-Data-Type,X-Auth-Token,X-Requested-With,If-Modified-Since...add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;