Local virtual hosts show Privacy Error on Chrome due to HSTS

风流意气都作罢 提交于 2019-12-24 05:24:07

问题


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:


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.



来源:https://stackoverflow.com/questions/47785872/local-virtual-hosts-show-privacy-error-on-chrome-due-to-hsts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!