【问题标题】:Disquss comments not loading via httpsDisqus 评论未通过 https 加载
【发布时间】:2017-05-12 14:09:39
【问题描述】:

昨天我们使用 Disqus URL Mapper 更改了几个 URL,但现在 cmets 不知何故不通过 https 加载,但它们通过 http 加载..

代码如下所示:

    var disqus_shortname = 'ourname';

    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();

我们更改的网址:

http://domain.be/blog/2017/03/27/blog-name-old/, http://domain.be/blog/2017/03/27/blog-name/
https://domain.be/blog/2017/03/27/blog-name-old/, https://domain.be/blog/2017/03/27/blog-name/

我已阅读此内容,但这不起作用 Why are disqus comments not loading over https?

【问题讨论】:

  • 你看过浏览器的错误控制台吗?
  • 没有显示错误
  • 你能指向一个实时的 URL 吗?
  • 嗯,Disqus 似乎可以在 https URL 上为我加载。还是您只是指文字 cmets? http:// 和 https:// 可能会被 Disqus 视为不同的资源,因此 cmets 绑定到 http:// 之一。我敢肯定他们有关于如何解决这个问题的文章

标签: javascript https disqus


【解决方案1】:

这种行为是有道理的:http URL 与 https URL 是不同的资源,您不能期望其中一个的 cmets 自动显示在另一个中。

Disqus' URL mapper tool 应该可以解决问题。

【讨论】:

  • 谢谢,有道理
猜你喜欢
  • 2016-08-04
  • 1970-01-01
  • 1970-01-01
  • 2011-08-16
  • 2012-02-15
  • 1970-01-01
  • 2023-04-07
  • 2014-01-03
  • 2013-12-12
相关资源
最近更新 更多