zl程序教程

您现在的位置是:首页 >  后端

当前栏目

nginx:支持跨域访问

Nginx跨域 支持 访问
2023-09-27 14:20:19 时间

在http节点中配置:

#支持跨域访问
    add_header Access-Control-Allow-Origin *;
    add_header Access-Control-Allow-Headers X-Requested-With;
    add_header Access-Control-Allow-Methods GET,POST,OPTIONS;

 

参考网址:http://www.51testing.com/html/96/215196-829360.html