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需要跨域,就在那个域名下添加

原文地址:https://www.cnblogs.com/wzy23/p/13638337.html