Skip to content

Commit f056b9d

Browse files
committed
Move 'Force SSL' definitions to host root configuration
This fixes issues with these settings not applying to custom locations defined under hosts.
1 parent ba5f0c2 commit f056b9d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/templates/dead_host.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ server {
55
{% include "_listen.conf" %}
66
{% include "_certificates.conf" %}
77
{% include "_hsts.conf" %}
8+
{% include "_forced_ssl.conf" %}
89

910
access_log /data/logs/dead_host-{{ id }}.log standard;
1011

1112
{{ advanced_config }}
1213

1314
{% if use_default_location %}
1415
location / {
15-
{% include "_forced_ssl.conf" %}
1616
{% include "_hsts.conf" %}
1717
return 404;
1818
}

backend/templates/proxy_host.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ server {
1111
{% include "_assets.conf" %}
1212
{% include "_exploits.conf" %}
1313
{% include "_hsts.conf" %}
14+
{% include "_forced_ssl.conf" %}
1415

1516
access_log /data/logs/proxy_host-{{ id }}.log proxy;
1617

@@ -43,7 +44,6 @@ server {
4344

4445
{% endif %}
4546

46-
{% include "_forced_ssl.conf" %}
4747
{% include "_hsts.conf" %}
4848

4949
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}

backend/templates/redirection_host.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ server {
77
{% include "_assets.conf" %}
88
{% include "_exploits.conf" %}
99
{% include "_hsts.conf" %}
10+
{% include "_forced_ssl.conf" %}
1011

1112
access_log /data/logs/redirection_host-{{ id }}.log standard;
1213

1314
{{ advanced_config }}
1415

1516
{% if use_default_location %}
1617
location / {
17-
{% include "_forced_ssl.conf" %}
1818
{% include "_hsts.conf" %}
1919

2020
{% if preserve_path == 1 or preserve_path == true %}

0 commit comments

Comments
 (0)