我目前有一个问题,我已经设置了一个烧瓶应用程序
CORS(app)
但我得到了每一种柯尔的错误作为回应。但这只会发生在生产中。
我会犯这样的错误
Access to XMLHttpRequest at 'https://example.com' from origin 'https://2e11e606fda6.ngrok.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
或
Access to XMLHttpRequest at 'https://example.com' from origin 'https://2e11e606fda6.ngrok.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed
我还通过nginx尝试了头文件中CORS请求的不同变体
location /
块,但这会导致一些类似的错误。
任何帮助都将不胜感激。