在我的系统中更新 Cordova 5.0 后,我创建了新的应用程序。当我在设备上测试我的应用程序时,控制台日志中出现了错误:
No Content-Security-Policy meta tag found.
Please add one when using the Cordova-plugin-whitelist plugin.: 23.
我在头部区域添加了meta标签。<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src: 'self' 'unsafe-inline' 'unsafe-eval'>
但是,我又一次遇到了同样的错误,在我使用的应用程序中,我使用了应用内浏览器插件和其他7个网站的链接。
cordova-plugin-whitelist
插件 - https://github.com/apache/cordova-plugin-whitelist ?之后,你需要在你的 config.xml 文件中添加<allow-navigation href="http://*/*" />
。 - Keval