nginx php 配置跨域

我使用的是lnmp一键安装包

在虚拟记住添加
add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'OPTION, POST, GET'; add_header 'Access-Control-Allow-Headers' 'X-Requested-With, Content-Type';

 

转载于:https://www.cnblogs.com/IT--Loding/p/8504732.html

你可能感兴趣的:(nginx php 配置跨域)