thinkphp跨域问题解决
https://www.jianshu.com/p/153615b79114
nginx静态资源跨域
location ~* .*\.(gif|jpg|jpeg|png|bmp|swf|ppt|xls|xlsx)$ {
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS;
if ($request_method = 'OPTIONS') {
return 204;
}
expires 30d;
} |