Skip to content

Commit ccaaaa8

Browse files
authored
Merge pull request #24 from vrenaville/hsts_enabling
feat: enable HSTS on all locations
2 parents db88606 + deb30f4 commit ccaaaa8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

9.0/templates/nginx.conf.tmpl

Lines changed: 3 additions & 2 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";
96+
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
9797

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

@@ -125,6 +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;
128129
proxy_buffering off;
129130
proxy_buffer_size 64k;
130131
proxy_busy_buffers_size 64k;
@@ -172,7 +173,7 @@ http {
172173

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

0 commit comments

Comments
 (0)