【发布时间】:2015-02-11 14:32:20
【问题描述】:
我们在 Magento 商店的购物车页面上收到大量混合内容错误
Mixed Content: The page at 'https://www.magento.com/onestepcheckout/index/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Lato:400,300,700,900'. This request has been blocked; the content must be served over HTTPS.
我可以看到谷歌字体文件正在通过 http 在我们主题的 head 部分中调用
<link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
我想知道解决这个问题的最佳方法是什么,我应该将上面的行更改为:
选项 1
<link href='https://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
或 选项 2
<link href='//fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
考虑到我们的大多数网站都使用 http,哪种方法最好?我不知道选项 2,这似乎是一个非常好的方法。
【问题讨论】:
-
也可能用于追踪任何其他包含混合内容的页面:httpschecker.net/how-it-works
标签: magento https mixed-content