Deezer内容通过HTTP提供 [英] Deezer content is served over HTTP

查看:241
本文介绍了Deezer内容通过HTTP提供的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Deezer Javascript SDK并通过https加载它。

I am using Deezer Javascript SDK and loaded it over https.

<script src="https://cdns-files.deezer.com/js/min/dz.js"></script>

但从今天开始Chrome和Firefox出现问题,因为Deezer SDK通过https加载了一些脚本而Chrome被拒绝了不安全的内容。

But from today Chrome and Firefox has problem, because Deezer SDK loading some script over https and Chrome rejected as insecure content.

Chrome控制台:

Chrome console:

混合内容:'https://页面... 。'是通过HTTPS加载的,但请求了一个不安全的脚本' http:// www。 deezer.com/js_trad-v00340851.php?l=cs 。此请求已被阻止;内容必须通过HTTPS提供。
playerBB.php:1混合内容:'https:// ....'的页面是通过HTTPS加载的,但请求了一个不安全的脚本' http://cdn-files.deezer.com/js/min/core-v00340851.js '。此请求已被阻止;内容必须通过HTTPS提供。
playerBB.php:1混合内容:'...'页面是通过HTTPS加载的,但请求了一个不安全的脚本' http://cdn-files.deezer.com/js/min/live-v00340851.js '。此请求已被阻止;内容必须通过HTTPS提供。

Mixed Content: The page at 'https://....' was loaded over HTTPS, but requested an insecure script 'http://www.deezer.com/js_trad-v00340851.php?l=cs'. This request has been blocked; the content must be served over HTTPS. playerBB.php:1 Mixed Content: The page at 'https://....' was loaded over HTTPS, but requested an insecure script 'http://cdn-files.deezer.com/js/min/core-v00340851.js'. This request has been blocked; the content must be served over HTTPS. playerBB.php:1 Mixed Content: The page at '...' was loaded over HTTPS, but requested an insecure script 'http://cdn-files.deezer.com/js/min/live-v00340851.js'. This request has been blocked; the content must be served over HTTPS.

推荐答案

当您的页面和远程资源使用不同的时会发生这种情况HTTP 协议:一个使用 HTTP ,另一个使用 HTTPS

This happens when your page and remote resource are using different HTTP protocols: one uses HTTP and another uses HTTPS.

包含第三方脚本的首选方法是:

The preferred way to include third-party scripts is this one:

<script src="//cdns-files.deezer.com/js/min/dz.js"></script>

删除 https: http:告诉浏览器使用与当前页面相同的协议加载文档。这应该消除安全警告。

Removing https: or http: tells browser to load the document using same protocol as current page. This should eliminate security warnings.

这篇关于Deezer内容通过HTTP提供的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆