离子内容安全,政策未找到(但包括)
问题描述:
我有以下错误:离子内容安全,政策未找到(但包括)
No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.
我已经在我的config.xml中包含它
<allow-navigation href="http://*/*" />
<access origin="*"/>
我知道这是“不安全”的方式来连接它,但我只是想在缩小它之前让它工作。我也试图缩小它没有任何运气。
我记得我试过使用ios的时候添加了一个后挂钩,但是现在我正在使用android,并且处于茫然之中。有任何想法吗? (插件安装)
答
尝试添加这个元标记为内容安全策略到您的index.html文件
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
希望这有助于
我曾与播放内容津贴允许某些东西,但它让我在那里,谢谢! – goofiw