Chrome 自动升级后,本地项目都无法访问
症状#
chrome 地址栏输入:xxx.app,回车后页面显示结果:
This site can’t be reached
xxx.app refused to connect.
原因#
chrome 最新版强制 http 转向 https
观察地址栏:会发现原来的 xxx.app
被强制加上 https://
变成 https://xxx.app
解决#
chrome 浏览器地址栏输入:chrome://net-internals/#hsts
在该页面中搜索:Query HSTS/PKP domain
在其下方的 Domain 后面的输入框中输入自己无法访问的域名,比如:domain.app,点击 Query 进行查询,如果有类似下面的结果,说明该域名后缀无法使用 http 前缀。
Found:
static_sts_domain: app
static_upgrade_mode: FORCE_HTTPS
static_sts_include_subdomains: true
static_sts_observed: 1508821200
static_pkp_domain:
static_pkp_include_subdomains:
static_pkp_observed:
static_spki_hashes:
dynamic_sts_domain:
dynamic_upgrade_mode: UNKNOWN
dynamic_sts_include_subdomains:
dynamic_sts_observed:
dynamic_sts_expiry:
dynamic_pkp_domain:
dynamic_pkp_include_subdomains:
dynamic_pkp_observed:
dynamic_pkp_expiry:
dynamic_spki_hashes:
如果没有任何返回结果,代表该域名后缀可以直接使用 http 协议,比如:domain.test 亲测可用。
注:目前 chrome 中,dev 和 app 都不可用。
另外,首次访问自己新修改的域名 domain.test 时,必须加上 http://
否则无法正确访问。
最后,如果你是使用的 valet,并且不介意被强制转向 https,可以在终端中输入:valet secure yourdomain
本作品采用《CC 协议》,转载必须注明作者和本文链接
推荐文章: