3

How can i disable same origin policy in Cordova 5.0.0? It seems to be enabled and i need to disable it for development reasons. I've tried to install crosswalk in hope of something changing but cross domain requests are still disabled. Im deploying to Android 5.1.

EDIT: I do have cordova-plugin-whitelist 1.0.0 and both <access origin="*"> and a CSP meta tag with default-src *

Also note that this problem only happens when using a remote src like <content src="http://remoteserver.com/app/index.html">. Everything works fine when content src is local like <content src="index.html">. But i need to have a remote content src to avoid having to redeploy the app every single write-run-debug cycle on a mobile device.

4

1 回答 1

-3

我建议您阅读cordova-plugin-whitelist 插件和关于CSP的文档。

使用 cordova 3.* yoy 只需从 config.xml 中的任何位置配置源。

使用 Cordova 5,您必须在项目中添加 cordova-plugin-whitelist 插件(自动为新项目添加),在 config.xml 中配置插件并在 html 文件中配置 CSP。

于 2015-05-21T08:23:11.593 回答