说明
HSTS – Strict Transport Security,就是增加一个 HTTP 头字段,告诉浏览器,这个域名以后的访问默认为 访问。

方法一:通过源程序实现/万能实现方式:

# 技术人员可以通过改写 /aspx/ 程序,增加一个 HTTP 头应答字段:
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload

方法二:面向  源服务器:

# 在配置站点域名的地方添加一行
add_header Strict-Transport-Security “max-age=31536000; includeSubdomains; preload”;

方法三:面向 Apache2 源服务器:

# 确保加载/启动一个模块
LoadModule headers_module modules/mod_headers.so# 在配置站点域名的地方添加一行
Header always set Strict-Transport-Security “max-age=31536000; includeSubdomains; preload”

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。