Skip to content

Commit

Permalink
[FIX] shorter HSTS timeout
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
gurneyalex committed Jun 12, 2023
1 parent ccaaaa8 commit 9c72e00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 9.0/templates/nginx.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ http {

client_max_body_size 1G;

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

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

Expand Down Expand Up @@ -125,7 +125,7 @@ http {
auth_basic_user_file /etc/nginx/htpasswd;
{{ end }}
add_header X-Static no;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Strict-Transport-Security "max-age=600; includeSubDomains" always;
proxy_buffering off;
proxy_buffer_size 64k;
proxy_busy_buffers_size 64k;
Expand Down Expand Up @@ -173,7 +173,7 @@ http {

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

0 comments on commit 9c72e00

Please sign in to comment.