Skip to content

Commit

Permalink
Merge pull request #24 from vrenaville/hsts_enabling
Browse files Browse the repository at this point in the history
feat: enable HSTS on all locations
  • Loading branch information
vrenaville authored May 24, 2023
2 parents db88606 + deb30f4 commit ccaaaa8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 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";
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

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

Expand Down Expand Up @@ -125,6 +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;
proxy_buffering off;
proxy_buffer_size 64k;
proxy_busy_buffers_size 64k;
Expand Down Expand Up @@ -172,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;
# 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 ccaaaa8

Please sign in to comment.