由于HSTS,本地虚拟主机在Chrome上显示“隐私错误" [英] Local virtual hosts show Privacy Error on Chrome due to HSTS

查看:145
本文介绍了由于HSTS,本地虚拟主机在Chrome上显示“隐私错误"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的开发过程创建了多个虚拟主机.直到昨天他们都工作得很好.但是今天在我的Chrome应用中,他们停止了工作. Chrome显示:NET::ERR_CERT_AUTHORITY_INVALID

I have created several virtual hosts for my development processes. They were working just fine till yesterday. But in my chrome app, today they stopped working. Chrome shows: NET::ERR_CERT_AUTHORITY_INVALID

我所有的虚拟主机都以 .dev 结尾.我将一个 .dev 更改为 .work ,然后它再次正常工作.但是我不能对所有虚拟主机执行此操作,因为它们太多了.我该怎么办?

All my vhosts end with .dev. I changed one .dev to .work and its again working. But I can not do this for all vhosts as there are too many of them. What do I do?

PS :

  1. 他们在Firefox中工作正常.
  2. 在Chrome隐身模式下,错误仍然存​​在.
  3. 我尝试清除缓存并进行重新加载,删除了我的历史记录和缓存,甚至多次重启chrome,但都无法正常工作.
  4. 在一种解决方案中,我发现 chrome://net-internals/#hsts 中可以包含一个例外.我尝试在其中进行删除域,但是以某种方式它仍会出现在查询域搜索中.
  1. They are working fine in firefox.
  2. The error remains same in chrome incognito mode.
  3. I tried clearing cache and hard reload, deleted my history and cache, restarting chrome even windows multiple time, nothing works.
  4. In one solution, I found an exception can be included in chrome://net-internals/#hsts. I tried deleting domain in there but somehow it still appears in Query Domain search.

推荐答案

Chrome浏览器已将.dev子域切换为仅HTTPS.

Chrome have switched the .dev sub domain to HTTPS only.

他们通过为此顶级域打开HSTS来做到这一点,但是通过将其预加载到Chrome代码中而不是发送HSTS标头来实现.这意味着无法在chrome://net-internals/#hsts屏幕中将其关闭.

They have done this by turning on HSTS for this top level domain, but by preloading this in the Chrome code rather than sending the HSTS header. This means it cannot be switched off in the chrome://net-internals/#hsts screen.

更多信息: https://ma.ttias.be/chrome- force-dev-domains-https-via-preloaded-hsts/

因此,您唯一的选择是:

So you’re only options are:

  1. 将您的虚拟主机更新为其他TLD(例如.test).是的,这可能会很痛苦,因为您有很多.

  1. Update you’re vhosts to a different TLD (e.g. .test). And yes this might be painful because you have so many.

通过创建证书并更新URL移至HTTPS.您可以创建一个可以自己创建的自签名证书,但是请注意,HSTS不仅会阻止通过纯文本HTTP访问站点,而且会阻止您单击证书错误.因此,您需要先手动将任何证书接受到信任存储中,然后才能使用.

Move to HTTPS by creating a certificate and updating your URLs. A self signed certificate that you can create yourself will do, however note that HSTS not only blocks accessing the site over plaintext HTTP, but also prevents you clicking through certificate errors. So you’ll need to manually accept any certificate to your trust store before it can be used.

Chrome小组越来越多地推动HTTPS,并且

The chrome team have been pushing HTTPS more and more and certain features are now HTTPS-only so even dev envs will need it now. So maybe it’s finally time take the effort to make the switch.

这篇关于由于HSTS,本地虚拟主机在Chrome上显示“隐私错误"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆