nginx_ui/nginx-ui-dev/template/block/hsts.conf

18 lines
538 B
Plaintext
Raw Normal View History

2025-03-04 19:28:12 +08:00
# Nginx UI Template Start
name = "HSTS"
author = "@0xJacky"
description = { en = "Enable HTTP Strict Transport Security", zh_CN = "启用 HTTP 严格传输安全"}
[variables.maxAge]
type = "string"
name = { en = "Max Age", zh_CN = "有效时间"}
value = "31536000"
[variables.includeSubDomains]
type = "boolean"
name = { en = "Include sub domains", zh_CN = "包括子域名"}
value = true
# Nginx UI Template End
add_header Strict-Transport-Security "max-age={{.maxAge}}; {{if .includeSubDomains}} includeSubDomains {{end}}" always;