This commit is contained in:
6543 2022-11-07 23:01:31 +01:00
parent a03ea956d5
commit 218b52094e
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862
3 changed files with 5 additions and 4 deletions

View file

@ -4,9 +4,9 @@ import (
"strings"
)
// GetHSTSHeader returns a HSTS header with includeSubdomains & preload for MainDomainSuffix and RawDomain, or an empty
// getHSTSHeader returns a HSTS header with includeSubdomains & preload for MainDomainSuffix and RawDomain, or an empty
// string for custom domains.
func GetHSTSHeader(host, mainDomainSuffix, rawDomain string) string {
func getHSTSHeader(host, mainDomainSuffix, rawDomain string) string {
if strings.HasSuffix(host, mainDomainSuffix) || strings.EqualFold(host, rawDomain) {
return "max-age=63072000; includeSubdomains; preload"
} else {