nginx 跨域配置,做点dns节点感觉还可以

nginx中配置跨域支持功能
vi /etc/nginx/nginx.conf
加入如下代码

http {

start####

add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;

end

}

:wq!保存

service nginx restart 重启nginx即可

猜你喜欢

转载自blog.csdn.net/weixin_34050427/article/details/87036057