How to permanently exclude localhost from HSTS list in Google Chrome

后端 未结 4 1897
时光取名叫无心
时光取名叫无心 2020-12-29 03:44

This is a followup question to Google Chrome redirecting localhost to https.

Does anyone know, how to permanently exclude localhost from HSTS list in Go

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-29 04:21

    Chrome 78 supports a policy called HSTSPolicyBypassList. You can list "localhost" as a domain to bypass HSTS. To configure Chrome policy on Linux, just create a file at /etc/opt/chrome/policies/managed/policies.json with the following content:

    {
        "HSTSPolicyBypassList": [
            "localhost"
            ]
    }
    

    You can see the policies loaded by Chrome, typing chrome://policy/ at address bar.

提交回复
热议问题