目录[-]
nginx配置跨域请求
Access-Control-Allow-Origin
报错信息
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
nginx配置
location里添加
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;