nginx php 配置跨域

时间:2021-07-22 07:47:21
我使用的是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';
nginx php 配置跨域