2019-02-18 03:21:45 -05:00
|
|
|
{% if certificate and certificate_id > 0 -%}
|
|
|
|
{% if ssl_forced == 1 or ssl_forced == true %}
|
|
|
|
{% if hsts_enabled == 1 or hsts_enabled == true %}
|
2021-03-13 07:40:47 -05:00
|
|
|
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always;
|
|
|
|
{% endif %}
|
2019-02-18 03:21:45 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|