首頁 >後端開發 >php教程 >nginx 配置ajax跨域访问php

nginx 配置ajax跨域访问php

WBOY
WBOY原創
2016-06-23 13:39:321102瀏覽

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