有人可以解释这个错误给出一个解决方案

时间:2015-10-16 06:38:02

标签: angularjs ion

当我使用chrome:// inspect /#devices时我遇到了这个错误,但很难解决它。

No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.
(anonymous function) @ console-via-logger.js:173
(anonymous function) @ whitelist.js:23
build @ cordova.js:53
require @ cordova.js:68
localRequire @ cordova.js:49
exports.mapModules @ cordova.js:1461
(anonymous function) @ cordova.js:1270
channel.join.f @ cordova.js:692
Channel.fire @ cordova.js:820
(anonymous function) @ cordova.js:1262
onScriptLoadingComplete @ cordova.js:1731
scriptLoadedCallback @ cordova.js:1748
(anonymous function) @ cordova.js:1702
28console-via-logger.js:173
No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.

1 个答案:

答案 0 :(得分:0)

您必须在index.html文件中添加Content-Security-Policy元标记:

{{1}}

有关Content-Security-Policy元标记的更多信息:official documentation

Cordova doc关于它:http://www.html5rocks.com/en/tutorials/security/content-security-policy/?redirect_from_locale=fr