Skip to content

Commit 882ec27

Browse files
authored
Merge pull request #1017 from Stealthii/bugfix/config-application
Apply 'Force SSL' and 'Enable Websockets' to full host definition
2 parents a84158c + 421934e commit 882ec27

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
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: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ server {
1111
{% include "_assets.conf" %}
1212
{% include "_exploits.conf" %}
1313
{% include "_hsts.conf" %}
14+
{% include "_forced_ssl.conf" %}
15+
16+
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
17+
proxy_set_header Upgrade $http_upgrade;
18+
proxy_set_header Connection $http_connection;
19+
proxy_http_version 1.1;
20+
{% endif %}
21+
1422

1523
access_log /data/logs/proxy_host-{{ id }}.log proxy;
1624

@@ -43,15 +51,8 @@ server {
4351

4452
{% endif %}
4553

46-
{% include "_forced_ssl.conf" %}
4754
{% include "_hsts.conf" %}
4855

49-
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
50-
proxy_set_header Upgrade $http_upgrade;
51-
proxy_set_header Connection $http_connection;
52-
proxy_http_version 1.1;
53-
{% endif %}
54-
5556
# Proxy!
5657
include conf.d/include/proxy.conf;
5758
}

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)