gpt4 book ai didi

google-chrome - Chrome 不支持相对 URL 中的 https

转载 作者:太空宇宙 更新时间:2023-11-03 12:40:38 25 4
gpt4 key购买 nike

我有一个网站可以在 Firefox 和 IE 中完美加载,但被 Chrome 阻止了。 Chrome 提示混合模式内容,但是所有资源都可以通过同一域内的相对 URL 访问。

根据我的理解,相对 URL 应该使用与正在加载的“主”页面相同的协议(protocol)。既然如此,我有以下几点:

<link href="/assets/css/small.css" title="Small" rel="alternate stylesheet" type="text/css" />
<link href="/assets/css/large.css" title="Large" rel="alternate stylesheet" type="text/css" />

两者都是相对 URL。通过 HTTPS 加载页面时,我从 Chrome 控制台获得以下信息(为了客户的隐私,我更改了域名):

    [blocked] The page at https://www.example.com/Login/ ran insecure    content from http://www.example.com/assets/css/small.css.     [blocked] The page at https://www.example.com/Login/ ran insecure content from    http://www.example.com/assets/css/large.css.

Am I wrong in the assumption that relative URLs should honor the requested protocol?

UPDATE:It is also blocking .js files referenced the same way:

<script src="/assets/scripts/change-text-size.js" type="text/javascript"></script>

被阻止:

[blocked] The page at https://www.example.com/Login/ ran insecure content from http://www.example.com/assets/scripts/change-text-size.js.

Another weird thing is that if I do view-source on the page that is having the issue, I see the relative url and if I hover the cursor over the "link" to the asset (stylesheet, .js file) the tooltip DOES say it is https:.

Update 2:There is nothing referenced in the .css file. Here is the entire contents of the "small.css" file mentioned above:

div#content-wrap,
div#content-one-col
{
font-size: 65%;
}

最佳答案

在您的公开示例中,静态 Assets 重定向到 http 版本,导致 Chrome 提示。

例如,如果您转到 https://www.bayerglucofacts.com/assets/css/de-de.css - 你得到一个 302 重定向到 http://www.bayerglucofacts.com/assets/css/de-de.css这给出了错误。

关于google-chrome - Chrome 不支持相对 URL 中的 https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12936209/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com