We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在测试后端 API 时,发现浏览器中报告 The 'Access-Control-Allow-Origin' header contains multiple values,上网搜了一下,原来是在不同的地方多次设置了 CORS headers 导致了这个错误。
The 'Access-Control-Allow-Origin' header contains multiple values
看了一下后端程序和 Nginx 的配置,发现这两个地方都设置了 CORS,于是取消了 Nginx 中的设置,API 就可以正常访问了。
参考资料:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
解决过程
在测试后端 API 时,发现浏览器中报告
The 'Access-Control-Allow-Origin' header contains multiple values
,上网搜了一下,原来是在不同的地方多次设置了 CORS headers 导致了这个错误。看了一下后端程序和 Nginx 的配置,发现这两个地方都设置了 CORS,于是取消了 Nginx 中的设置,API 就可以正常访问了。
参考资料:
The text was updated successfully, but these errors were encountered: