【问题标题】:Ionic2/Cordova - No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist pluginIonic2/Cordova - 找不到 Content-Security-Policy 元标记。使用cordova-plugin-whitelist插件时请加一个
【发布时间】:2016-10-02 11:30:52
【问题描述】:

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

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

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

你猜猜我该如何解决?

【问题讨论】:

    标签: android cordova cordova-plugins ionic2


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2016-03-13
      • 2015-10-20
      • 2017-06-03
      • 1970-01-01
      • 1970-01-01
      • 2015-08-12
      • 1970-01-01
      • 1970-01-01
      • 2020-04-20
      相关资源
      最近更新 更多