跨域设置:
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Methods 'PUT, POST, GET, DELETE, OPTIONS';
add_header Access-Control-Allow-Headers 'version, access-token, user-token, Accept, apiAuth, User-Agent, Keep-Alive, Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With, Authorization, Content-Length';
add_header Access-Control-Max-Age '0';
add_header Access-Control-Allow-Credentials 'true';

完整:
`
location /
{
expires -1;
proxy_pass http://IP地址:端口;
proxy_set_header Host host;
proxy_set_header X-Real-IP
remote_addr;
proxy_set_header X-Forwarded-For proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST
remote_addr;

add_header X-Cache upstream_cache_status;

add_header Access-Control-Allow-Originhttp_origin;
add_header Access-Control-Allow-Methods 'PUT, POST, GET, DELETE, OPTIONS';
add_header Access-Control-Allow-Headers 'version, access-token, user-token, Accept, apiAuth, User-Agent, Keep-Alive, Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With, Authorization, Content-Length';
add_header Access-Control-Max-Age '0';
add_header Access-Control-Allow-Credentials 'true';

proxy_set_header Accept-Encoding "";

sub_filter_once off;

proxy_cache cache_one;
proxy_cache_key hosturiis_argsargs;
proxy_cache_valid 200 304 301 302 12h;

}
`