天天看点

nginx增加跨域配置header

add_header 'Access-Control-Allow-Origin' 'data.test.com';

add_header 'Access-Control-Allow-Methods' 'PUT,POST,GET,DELETE,OPTIONS';

add_header 'Access-Control-Allow-Headers' 'Content-Type,Content-Length, Authorization, Accept,X-Requested-With';

add_header 'X-Powered-By' ' 3.2.1';

并reload

      本文转自Tenderrain 51CTO博客,原文链接:http://blog.51cto.com/tenderrain/2068245,如需转载请自行联系原作者

继续阅读