Fix hsts syntax

This commit is contained in:
Gene Liverman 2024-08-28 11:27:44 -04:00
parent 13abf7f895
commit 2299bac78c
3 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ in {
# Add HSTS header with preloading to HTTPS requests. # Add HSTS header with preloading to HTTPS requests.
# Adding this header to HTTP requests is discouraged # Adding this header to HTTP requests is discouraged
map $scheme $hsts_header { map $scheme $hsts_header {
https "max-age=31536000 always;"; https "max-age=31536000;";
} }
add_header Strict-Transport-Security $hsts_header; add_header Strict-Transport-Security $hsts_header;
''; '';

View file

@ -67,7 +67,7 @@ in {
# Add HSTS header with preloading to HTTPS requests. # Add HSTS header with preloading to HTTPS requests.
# Adding this header to HTTP requests is discouraged # Adding this header to HTTP requests is discouraged
map $scheme $hsts_header { map $scheme $hsts_header {
https "max-age=31536000 always;"; https "max-age=31536000;";
} }
add_header Strict-Transport-Security $hsts_header; add_header Strict-Transport-Security $hsts_header;
''; '';

View file

@ -213,7 +213,7 @@ in {
# Add HSTS header with preloading to HTTPS requests. # Add HSTS header with preloading to HTTPS requests.
# Adding this header to HTTP requests is discouraged # Adding this header to HTTP requests is discouraged
map $scheme $hsts_header { map $scheme $hsts_header {
https "max-age=31536000 always;"; https "max-age=31536000;";
} }
add_header Strict-Transport-Security $hsts_header; add_header Strict-Transport-Security $hsts_header;
''; '';