最新活动 七周年庆典

产品

硅云帮助文档中心

搜索文档

热门搜索词:

nginx服务器配置允许跨域请求

更新时间:2022-04-18 16:24  版本:v1.0
分享到:
我要反馈 
收藏 我的收藏

nginx是一款常用的web服务器软件,以下是设置nginx允许跨域请求的设置(默认是不允许跨域):

 

    add_header 'Access-Control-Allow-Origin' '*';

    add_header 'Access-Control-Allow-Credentials' 'true';

    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';


您对该文档有什么建议?

您对该文档的评分:

本文导航

搜索文档