繁体   English   中英

Ionic2 / Cordova-未找到内容安全策略元标记。 使用cordova-plugin-whitelist插件时,请添加一个

[英]Ionic2/Cordova - No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin

在Android设备/模拟器中运行时,我在Ionic2应用程序中遇到以下错误:

找不到Content-Security-Policy元标记。 使用cordova-plugin-whitelist插件时,请添加一个。

错误会阻止所有与后端的连接,并引发403错误。

关于如何解决的任何猜测?

将此行添加到您的html文件中:

<meta http-equiv="Content-Security-Policy" content="*"/>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM