Files
nginx-proxy-manager/backend/templates/_hsts_map.conf
T
Juice-de-Orange 076c522ccc fix: apply the HSTS sub-domains setting per host
_hsts_map.conf defined $hsts_header with the host's own value in every
host config. A map is global to nginx, so one definition won for all
hosts and the "HSTS Sub-domains" switch of the others was ignored.

Define two fixed maps instead and let _hsts.conf pick one per host.
They get new names, so configs generated before this change, which
still define $hsts_header, can't override them. The maps keep HSTS
limited to https.

Fixes #5947
2026-10-24 16:38:10 +02:00

6 lines
174 B
Plaintext

map $scheme $hsts_header_plain {
https "max-age=63072000; preload";
}
map $scheme $hsts_header_subdomains {
https "max-age=63072000;includeSubDomains; preload";
}