首页 >后端开发 >php教程 >nginx 配置ajax跨域访问php

nginx 配置ajax跨域访问php

WBOY
WBOY原创
2016-06-23 13:39:321107浏览

server {     add_header 'Access-Control-Allow-Origin' '*';    add_header 'Access-Control-Allow-Credentials' 'true';    add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken';    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';    add_header PS 1;    location / {          }}

参考:

    http://stackoverflow.com/questions/18450310/nginx-add-header-not-working

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn