Skip to content

Commit b7fb2cf

Browse files
authored
Merge pull request #947 from phantomski77/patch-2
Update _hsts.conf template to increase HSTS max-age value
2 parents e4988f3 + 1c64252 commit b7fb2cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/templates/_hsts.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% if certificate and certificate_id > 0 -%}
22
{% if ssl_forced == 1 or ssl_forced == true %}
33
{% if hsts_enabled == 1 or hsts_enabled == true %}
4-
# HSTS (ngx_http_headers_module is required) (31536000 seconds = 1 year)
5-
add_header Strict-Transport-Security "max-age=31536000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always;
4+
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
5+
add_header Strict-Transport-Security "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always;
6+
{% endif %}
67
{% endif %}
78
{% endif %}
8-
{% endif %}

0 commit comments

Comments
 (0)