diff --git a/nginx.tmpl b/nginx.tmpl index 855e90d..9cf7030 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -153,7 +153,9 @@ server { ssl_dhparam {{ printf "/etc/nginx/certs/%s.dhparam.pem" $cert }}; {{ end }} + {{ if ne (coalesce (first (groupByKeys $containers "Env.SKIP_HSTS")) "") "1" }} add_header Strict-Transport-Security "max-age=31536000"; + {{ end }} {{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }} include {{ printf "/etc/nginx/vhost.d/%s" $host }};