Skip to content

Commit 9c72e00

Browse files
committed
[FIX] shorter HSTS timeout
Until we have a stable setup for this, set the HSTS header with a max-age of 10min instead of 1y so we can test things ref: https://www.nginx.com/blog/http-strict-transport-security-hsts-and-nginx/ "Testing HTTP Strict Transport Security with Care"
1 parent ccaaaa8 commit 9c72e00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

9.0/templates/nginx.conf.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ http {
9393

9494
client_max_body_size 1G;
9595

96-
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
96+
add_header Strict-Transport-Security "max-age=600; includeSubDomains" always;
9797

9898
access_log /var/log/nginx/access.log json_combined;
9999

@@ -125,7 +125,7 @@ http {
125125
auth_basic_user_file /etc/nginx/htpasswd;
126126
{{ end }}
127127
add_header X-Static no;
128-
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
128+
add_header Strict-Transport-Security "max-age=600; includeSubDomains" always;
129129
proxy_buffering off;
130130
proxy_buffer_size 64k;
131131
proxy_busy_buffers_size 64k;
@@ -173,7 +173,7 @@ http {
173173

174174
proxy_cache_bypass $http_cache_control;
175175
add_header X-Cache-Status $upstream_cache_status;
176-
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
176+
add_header Strict-Transport-Security "max-age=600; includeSubDomains" always;
177177
# there is no inheritance of proxy_set_header, as soon as we define one at a level,
178178
# we need to redefine all
179179
include /etc/nginx/proxy_headers.conf;

0 commit comments

Comments
 (0)