google-chrome - 从 HTTPS 页面访问 HTTP 图像源时来自 Chrome 87 的混合内容警告

标签 google-chrome mixed-content

我们有一个在公司桌面上运行的内部 (.Net) 应用程序。它运行一个小型 Web 服务器,监听 localhost 上特定端口上的 HTTP 请求。 .我们有一个单独的 HTTPS 网站,通过设置 ImageUrl 与此应用程序进行通信。的 URL 的隐藏图像 - 这会调用到 localhost 的 HTTP 请求, 应用程序选择并采取行动。例如,该站点会将图像的 URL 设置为:

http://127.0.0.1:5000/?command=dostuff
这是为了解决来自站点的任何类型的“混合内容”消息,因为图像似乎不受混合内容规则的约束。有点hack,但效果很好。
我已经看到 Chrome 正在朝着完全阻止页面上的混合内容迈进,果然 Chrome 87(目前在 beta channel 上)现在在控制台中显示了这些警告:

Mixed Content: The page at 'https://oursite.company.com/' was loaded over HTTPS, but requested an insecure element 'http://127.0.0.1:5000/?command=dostuff'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html


然而,尽管警告说请求正在自动升级,但它并没有——应用程序仍然收到一个普通的 HTTP 请求并继续正常工作。
关于此警告是否为“软失败”以及 Chrome 的 future 版本是否会强制自动升级到 HTTPS(这会破坏事情),我找不到任何明确的指导。从长远来看,我们计划更换该应用程序,但我希望在任何会在此之前突然停止该应用程序工作的事情发生之前。
使用 HTTP 到 localhost 来获取图像和其他混合内容,如上述场景中使用的那样,将来会成为一个实际问题吗?

最佳答案

此答案将集中在您的主要问题上:使用 HTTP 到 localhost 来获取图像和其他混合内容,如上述场景中使用的那样,将来会成为一个实际问题吗?
答案是是的 .
blog post you linked to说:

Update (April 6, 2020): Mixed image autoupgrading was originally scheduled for Chrome 81, but will be delayed until at least Chrome 84. Check the Chrome Platform Status entry for the latest information about when mixed images will be autoupgraded and blocked if they fail to load over https://.


该状态条目说:

In developer trial (Behind a flag) (tracking bug) in:
Chrome for desktop release 86
Chrome for Android release 86
Android WebView release 86

Last updated on 2020-11-03


所以这个功能被推迟了,但它即将到来。

关于google-chrome - 从 HTTPS 页面访问 HTTP 图像源时来自 Chrome 87 的混合内容警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64534841/

相关文章:

google-chrome - 混合内容错误与警告

wordpress - 混合内容/不安全内容 SSL

google-chrome - 如何从 Visual Studio 代码启动 Chrome?

javascript - 在此示例中,为什么 window.getSelection() on focus 在 Chrome 中不起作用?

google-chrome - 禁用提交按钮会停止 chrome/IE8 中的请求

reactjs - 使用 SWAPI(星球大战 API)的 React 项目出现混合内容错误

google-chrome - Vue - Chrome 开发者控制台中的混合内容警告

html - Bootstrap 4 alpha 6 导航栏在谷歌浏览器上无法正确显示

html - Chrome HTML5 视频横向翻转纵向

javascript - 如何获取最新的 Chrome(版本 55)以允许混合内容?