File tree 6 files changed +15
-1
lines changed
6 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 2
2
{% if ssl_forced == 1 or ssl_forced == true %}
3
3
{% if hsts_enabled == 1 or hsts_enabled == true %}
4
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;
5
+ add_header Strict-Transport-Security $hsts_header always;
6
6
{% endif %}
7
7
{% endif %}
8
8
{% 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
+
1
3
location {{ path }} {
2
4
proxy_set_header Host $host;
3
5
proxy_set_header X-Forwarded-Scheme $scheme;
Original file line number Diff line number Diff line change 1
1
{% include "_header_comment.conf" %}
2
2
3
3
{% if enabled %}
4
+
5
+ {% include "_hsts_map.conf" %}
6
+
4
7
server {
5
8
{% include "_listen.conf" %}
6
9
{% include "_certificates.conf" %}
Original file line number Diff line number Diff line change 1
1
{% include "_header_comment.conf" %}
2
2
3
3
{% if enabled %}
4
+
5
+ {% include "_hsts_map.conf" %}
6
+
4
7
server {
5
8
set $forward_scheme {{ forward_scheme }};
6
9
set $server "{{ forward_host }}";
Original file line number Diff line number Diff line change 1
1
{% include "_header_comment.conf" %}
2
2
3
3
{% if enabled %}
4
+
5
+ {% include "_hsts_map.conf" %}
6
+
4
7
server {
5
8
{% include "_listen.conf" %}
6
9
{% include "_certificates.conf" %}
You can’t perform that action at this time.
0 commit comments