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.

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

 

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

 

 

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

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

 

 

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

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

 

相关文章:

  • 2022-02-02
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-06-04
猜你喜欢
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
相关资源
相似解决方案