宝塔解决域名跨域

nignx文件中增加如下代码:

具体位置:网站–>设置–>配置文件(server 标签中添加)

 add_header Access-Control-Allow-Origin '*';
add_header Access-Control-Allow-Methods 'POST,PUT,GET,DELETE';
add_header Access-Control-Allow-Headers 'version, access-token, user-token, Accept, apiAuth, User-Agent, Keep-Alive, Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With'; 

1、原创文章,作者:诺米,如若转载,请注明出处:https://www.http3w.com/archives/714

2、本站内容若有雷同从属巧合,若侵犯了您的权益,请联系本站删除,E-mail: wtao219@qq.com

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注