nginx跨域

在 conf文件server块里面加上:

add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Max-Age' 1728000;

 

你可能感兴趣的:(nginx跨域)