没有混合内容的 iframe 混合内容警告

iframe mixed content warning without mixed content

本文关键字:混合 警告 iframe      更新时间:2023-09-26

也许我只是在这里失去了理智,但我不断收到此页面的混合内容警告:

<!doctype html>
<html lang="en-us">
        <head>
            <link rel="stylesheet" type="text/css" href="css/style.css">
        </head>
        <body>
           <iframe scrolling="no" id="slides" src="admin/slides.html"></iframe>
           <iframe scrolling="no" id="sidebar" src="/sidebar"></iframe>
           <iframe scrolling="no" id="ticker" src="/clock2"></iframe>
        </body>
    </html>

这让我非常困惑,因为所有内容都在同一个域上,并且所有页面都通过https提供。更令人困惑的是,第一个 iframe 实际上在没有警告的情况下工作,后两个则没有。此外,当您直接访问它们时,后两个页面在https上工作得很好。它们甚至不存在于http上 - 我的.htaccess重定向到https。所有资源都通过 https 加载。我什至尝试在 src 中使用带有 https 前缀的 fqdn 而不是相对引用,但它没有帮助。

我错过了什么?

我不太确定为什么会发生这种情况,但是从/sidebar到/sidebar/(index.html)的重定向是通过HTTP进行的。我很确定用/sidebar/index.html 或只是/sidebar/替换链接会解决您的问题。

我刚刚测试了它,这是通过https加载的链接/sidebar/和/clock2/的屏幕截图 http://puu.sh/nzsnu/b421dfb4bd.png。