Local virtual hosts show Privacy Error on Chrome d

2019-07-21 00:17发布

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

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. 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.

1条回答
ゆ 、 Hurt°
2楼-- · 2019-07-21 01:03

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

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.

More info: https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

So you’re only options are:

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

  2. 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.

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.

查看更多
登录 后发表回答