ZE3kr / GuoZeyu.com

我的网站文章的原始数据与历史
https://guozeyu.com
Creative Commons Attribution Share Alike 4.0 International
20 stars 7 forks source link

2015/12/https-everywhere-is-coming/ #16

Open ZE3kr opened 2 years ago

ZE3kr commented 2 years ago

Written on 12/13/2015 01:19:00

URL: https://guozeyu.com/2015/12/https-everywhere-is-coming/

ZE3kr commented 2 years ago

Comment written by 张三 on 08/22/2016 02:02:54

那么在 Nginx 上如何实现强制 HTTPS 呢?

ZE3kr commented 2 years ago

Comment written by 李四 on 08/22/2016 02:04:21

可以这样实现强制 HTTPS:

location / {
return 301 https://$host$request_uri;
}
ZE3kr commented 2 years ago

Comment written by ZE3kr on 08/22/2016 02:06:45

应该再添加 HSTS 头部

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
ZE3kr commented 2 years ago

Comment written by danghr on 06/12/2018 05:41:56

话说12306改用了DigiCert的证书,然后SSL Labs的测试现在是A级了……

ZE3kr commented 2 years ago

Comment written by ZE3kr on 06/13/2018 12:46:52

SSL Labs 终于不是自签名的证书了,可喜可贺!