nginx跨域
server {listen 8080;
include enable-php.conf;
root /home/wwwroot/image;
location /
{
add_header 'Access-Control-Allow-Origin' 'http://www.tisunion.com';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET';
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ /\.
{
deny all;
}
access_log/home/wwwlogs/image.logaccess;
}
页:
[1]