一、修改主配置文件
vim /etc/nginx/nginx.conf
add_header Access-Control-Allow-Origin *; #防止跨域问题,添加如下代码配置* 可以写成访问域名地址
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS
;
一、修改主配置文件
vim /etc/nginx/nginx.conf
add_header Access-Control-Allow-Origin *; #防止跨域问题,添加如下代码配置* 可以写成访问域名地址
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS
;