File tree Expand file tree Collapse file tree 6 files changed +15
-1
lines changed Expand file tree Collapse file tree 6 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 22{% if ssl_forced == 1 or ssl_forced == true %}
33{% if hsts_enabled == 1 or hsts_enabled == true %}
44 # 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;
5+ add_header Strict-Transport-Security $hsts_header always;
66{% endif %}
77{% endif %}
88{% endif %}
Original file line number Diff line number Diff line change 1+ map $scheme $hsts_header {
2+ https "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload";
3+ }
Original file line number Diff line number Diff line change 1+ {% include "_hsts_map.conf" %}
2+
13 location {{ path }} {
24 proxy_set_header Host $host;
35 proxy_set_header X-Forwarded-Scheme $scheme;
Original file line number Diff line number Diff line change 11{% include "_header_comment.conf" %}
22
33{% if enabled %}
4+
5+ {% include "_hsts_map.conf" %}
6+
47server {
58{% include "_listen.conf" %}
69{% include "_certificates.conf" %}
Original file line number Diff line number Diff line change 11{% include "_header_comment.conf" %}
22
33{% if enabled %}
4+
5+ {% include "_hsts_map.conf" %}
6+
47server {
58 set $forward_scheme {{ forward_scheme }};
69 set $server "{{ forward_host }}";
Original file line number Diff line number Diff line change 11{% include "_header_comment.conf" %}
22
33{% if enabled %}
4+
5+ {% include "_hsts_map.conf" %}
6+
47server {
58{% include "_listen.conf" %}
69{% include "_certificates.conf" %}
You can’t perform that action at this time.
0 commit comments