# 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;
