diff --git a/nginx.tmpl b/nginx.tmpl index 255cc35..c68bfac 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -135,7 +135,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 }};