我想嵌入一个iframe(包含shellinabox,如果这是相关的)到HTTPS网页上。我使用嵌入的iframe的HTML是非常简单的:iframe被屏蔽为不安全的内容,即使iframe是HTTPS
<div class="jumbotron" style="min-height: 400px;">
<iframe src="https://example.com/shellinabox" style="border:none; min-height: 400px;" width="100%"></iframe>
</div>
然而,Chrome会阻止加载的iframe,因为它是“不安全的内容,”我必须手动解锁为它工作。在Chrome控制台报告一个错误这样的:
Mixed Content: The page at 'https://example.com/mainpage/' was loaded over HTTPS, but requested an insecure resource 'http://example.com/shellinabox/'. This request has been blocked; the content must be served over HTTPS.
我为此感到困惑,因为我清楚的HTML代码是嵌入example.com/shellinabox
HTTPS版本。此外,当我直接访问https://example.com/shellinabox
时,锁定图标变为绿色,没有任何内容被阻止,并且该页面上没有任何SSL问题的迹象。我也在Firefox,IE和MS边缘测试过它们,它们都有相同的行为(所以它不是特定于Chrome的问题)。是什么赋予了?
https://developers.google.com/web/fundamentals/security/prevent-mixed-content/fixing-mixed-content – Tom