_hsts.conf 415 B

12345678
  1. {% if certificate and certificate_id > 0 -%}
  2. {% if ssl_forced == 1 or ssl_forced == true %}
  3. {% 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;
  6. {% endif %}
  7. {% endif %}
  8. {% endif %}