nginx跨域(The 'Access-Control-Allow-Origin' header contains multiple values '*, *)

https://www.jianshu.com/p/1080014a234f(跨域配置)

 

问题现象

Access to XMLHttpRequest at 'https://api.gstianfu.com/public/fund/announce_detail?aid=654247428725' from origin 'https://mobile.igesafe.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed.

 

 

 

 

原因:加跨域时,直接在server块中添加,

 

 

解决方法:哪个URL需要跨域,就在那个域名下添加

 

posted @ 2020-09-09 13:50  第十一个程序员  阅读(3547)  评论(0编辑  收藏  举报