Home > Backend Development > PHP Tutorial > nginx 配置ajax跨域访问php

nginx 配置ajax跨域访问php

WBOY
Release: 2016-06-23 13:39:32
Original
1110 people have browsed it

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 / {          }}
Copy after login

参考:

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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template