【问题标题】:Phonegap image not loading from a external httpPhonegap 图像未从外部 http 加载
【发布时间】:2016-12-01 21:34:07
【问题描述】:

我的 phonegap 应用在使用 phonegap 4.0 时运行良好。

刚刚升级到 6.0,使用相同的代码。这些从自己加载的图像被加载,但那些从外部 http 加载的图像没有被加载。例如http://www.hihi.com。我尝试更改元 CSP 设置和 config.xml,都没有帮助。

config.xml

<access origin="*"></access>
<allow-navigation href="http://*/*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> 
<allow-intent href="*" />

index.html(添加了img-src *)

<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline';img-src *; style-src 'self' 'unsafe-inline'; media-src *" />

还有其他原因吗?我正在从 phonegap 桌面服务器和 phonegap 移动应用程序运行

【问题讨论】:

标签: image cordova content-security-policy


【解决方案1】:

好的。知道原因但没有解决。这是因为 phonegap 桌面服务器应用程序覆盖了我们自己的 CSP 设置。

链接 github.com/phonegap/connect-phonegap/issues/163 – Fxster 43 分钟前编辑

安装到手机时正在加载图片

【讨论】:

    猜你喜欢
    • 2020-04-16
    • 1970-01-01
    • 1970-01-01
    • 2021-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多