Openlitespeed /litespeed 添加HSTS的方法
编辑虚拟机的配置文件。添加一下代码即可
context / {
type proxy
handler gobbs
extraHeaders <<<END_extraHeaders
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options nosniff
X-XSS-Protection 1;mode=block
X-Frame-Options SAMEORIGIN
END_extraHeaders
addDefaultCharset off
}
或者在后台-资源集-头部操作,添加下面代码
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options nosniff
X-XSS-Protection 1;mode=block
X-Frame-Options SAMEORIGIN