2017-02-09 90 views
0

我在我的https网站上收到间歇性混合内容错误。该网站的链接是stakeholdermap.com如何阻止Adsense在https网站上加载混合内容?

我已经检查Chrome浏览器开发工具>网络选项卡,我看到下面不安全网址的例子:

Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://static.vertamedia.com/static/vpaid-ssp-vast.swf?aid=41476&sid=0&cb=146233.42079096.743365'. This content should also be served over HTTPS. ads?client=ca-pub-3370240294319443&format=300x250&output=html&h=250&slotname=8722343817&adk=5159607… 

Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://ads2.vertamedia.com/vast/vpaid-config/?width=300&height=250&aid=4147…takeholdermap.com&v=2.2.90&t=flash&video_duration=&cb=73026784276589750000'. This content should also be served over HTTPS. 

但广告位使用的是最新的代码(//pagead2.googlesyndication.com/ pagead/js/adsbygoogle.js)

我很确定这些是由Adsense加载的。我的问题是如何阻止或强制它使用https?

回答

1

向用户的浏览器来获取安全内容,如果可能的话: <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> 如果广告是通过HTTPS使用,那么它会获取该版本,否则,内容将被屏蔽,并在其另一处所示。把meta放在你网页上的<head>部分,其中包含你所有的其他meta标签。

您可以在这里找到更多的信息:https://developers.google.com/web/fundamentals/security/prevent-mixed-content/fixing-mixed-content

+0

这似乎工作!谢谢! – projectmonkey