mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-18 15:24:38 +02:00
17 lines
538 B
Text
17 lines
538 B
Text
# 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;
|