You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nginx-ui/template/block/hsts.conf

18 lines
538 B
Plaintext

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