这几天才发现,mail.mmf.moe
的服务不知道为什么上不去了。出错的地址是 https://mail.mmf.moe
,这令我大惑不解。
尝试了一下 curl
,发现 http
没有问题,https
就是不行。
http
结果:
1$ curl -v http://mail.mmf.moe2* Trying 172.217.24.19:80...3* Connected to mail.mmf.moe (172.217.24.19) port 80 (#0)4> GET / HTTP/1.15> Host: mail.mmf.moe6> User-Agent: curl/7.72.07> Accept: */*8>9* Mark bundle as not supporting multiuse10< HTTP/1.1 301 Moved Permanently11< Location: https://mail.google.com/a/mmf.moe12< Date: Fri, 04 Sep 2020 09:51:17 GMT13< Content-Type: text/html; charset=UTF-814< Server: ghs15< Content-Length: 23016< X-XSS-Protection: 017< X-Frame-Options: SAMEORIGIN18<19<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">20<TITLE>301 Moved</TITLE></HEAD><BODY>21<H1>301 Moved</H1>22The document has moved23<A HREF="https://mail.google.com/a/mmf.moe">here</A>.24</BODY></HTML>25* Connection #0 to host mail.mmf.moe left intact
https
的结果:
1$ curl -v https://mail.mmf.moe2* Trying 172.217.24.19:443...3* Connected to mail.mmf.moe (172.217.24.19) port 443 (#0)4* ALPN, offering h25* ALPN, offering http/1.16* successfully set certificate verify locations:7* CAfile: /etc/ssl/certs/ca-certificates.crt8 CApath: none9* TLSv1.3 (OUT), TLS handshake, Client hello (1):10* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mail.mmf.moe:44311* Closing connection 012curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to mail.mmf.moe:443
既然如此,那不如直接用 http
?何必跳转到 https
呢?我尝试了一下,但是无论如何他都会自动跳转到 https
。通过 Developer Tools
,我发现跳转的状态码是 307
:
![当时没有截图,只能拿历史记录顶了(](https://static.mmf.moe/wp/2020/09/image.png)
不过这个痕迹并没有带来什么线索。于是我找到了 GSuite
关于自定义域名的帮助页面[1]:
看到最后一条 Troubleshoot
,官方明确表示不支持 https
跳转,并且指出了 HSTS
可能存在的问题。于是我想起来我之前好像在 Cloudflare
那里配置过 HSTS
相关的内容。
Cloudflare
来到 Cloudflare
,在 SSL/TLS
、边缘证书,找到 HTTP
严格传输安全:
可以看到这里有一项名为包括子域,之前是开启的,我选择把它关闭。在关闭之后,无痕模式的浏览恢复了正常,但正常状态下依然无解。于是这时候,我想到了缓存的存在。
清理 HSTS
缓存
来到 chrome://net-internals/#hsts,拉到最下面,清除 mmf.moe
的内容:
然后再上去查询,可以看到 dynamic_sts_include_subdomains
是 false
,这时候就可以正常跳转了。