如何修复错误 "Failed to load ressource : Acces-control-allow-origin cannot contain more than one origin"
How to fix error "Failed to load ressource : Acces-control-allow-origin cannot contain more than one origin"
我们最近聘请了一家外部公司为我们开发移动应用程序。
我们已经为他们提供了 API,但他们在编译 iOs 可执行文件时遇到问题。 (在 android 下一切正常)
他们收到的错误消息是:"Failed to load resource: Access-Control-Allow-Origin cannot contain more than one origin "
我们使用 symfony 4、Nelmio CORS 和 nginx 配置。
我们将其添加到我们的 nginx 配置中,但问题仍然存在 (https://enable-cors.org/server_nginx.html)("Authorization" 已添加到 GET 和 POST 方法中),老实说我不知道我需要做什么来帮助他们。
你有什么想法吗?这是服务器问题吗?还是他们这边的发展问题?在我们身上?
他们将 Cordova 与 ionic 和 WKWebView 结合使用。
一旦启用 CORS,WKWebView 似乎会导致问题。
我检查了我的 Api 回复,它显示了很好的价值:Access-Control-Allow-Origin
如果您想获得更多信息,我随时为您服务
这次不是服务器端问题。
双重Header访问控制=>仅当运行命令
ionic cordova run [android/ios] —livereload
和访问 API、iOS 问题:
Allow-navigation 和 Allow-intent 添加到 confix.xml > iOS 平台:
<allow-intent href="*" />
<allow-navigation href="*" />
我们最近聘请了一家外部公司为我们开发移动应用程序。
我们已经为他们提供了 API,但他们在编译 iOs 可执行文件时遇到问题。 (在 android 下一切正常)
他们收到的错误消息是:"Failed to load resource: Access-Control-Allow-Origin cannot contain more than one origin "
我们使用 symfony 4、Nelmio CORS 和 nginx 配置。
我们将其添加到我们的 nginx 配置中,但问题仍然存在 (https://enable-cors.org/server_nginx.html)("Authorization" 已添加到 GET 和 POST 方法中),老实说我不知道我需要做什么来帮助他们。
你有什么想法吗?这是服务器问题吗?还是他们这边的发展问题?在我们身上?
他们将 Cordova 与 ionic 和 WKWebView 结合使用。 一旦启用 CORS,WKWebView 似乎会导致问题。
我检查了我的 Api 回复,它显示了很好的价值:Access-Control-Allow-Origin
如果您想获得更多信息,我随时为您服务
这次不是服务器端问题。
双重Header访问控制=>仅当运行命令
ionic cordova run [android/ios] —livereload
和访问 API、iOS 问题:
Allow-navigation 和 Allow-intent 添加到 confix.xml > iOS 平台:
<allow-intent href="*" />
<allow-navigation href="*" />