ngnix跨域访问设置,需要在nginx.conf中设置:
add_header Access-Control-Allow-Origin http://** 可以指定域名
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
ngnix跨域访问设置,需要在nginx.conf中设置:
add_header Access-Control-Allow-Origin http://** 可以指定域名
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;