Skip to content

Commit ae1255d

Browse files
committed
Fix whitespace in nginx stream config
1 parent 7307515 commit ae1255d

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{% if certificate and certificate_id > 0 -%}
1+
{% if certificate and certificate_id > 0 %}
22
{% if certificate.provider == "letsencrypt" %}
33
# Let's Encrypt SSL
44
include conf.d/include/ssl-cache-stream.conf;
55
include conf.d/include/ssl-ciphers.conf;
66
ssl_certificate /etc/letsencrypt/live/npm-{{ certificate_id }}/fullchain.pem;
77
ssl_certificate_key /etc/letsencrypt/live/npm-{{ certificate_id }}/privkey.pem;
8-
{% else %}
8+
{%- else %}
99
# Custom SSL
1010
ssl_certificate /data/custom_ssl/npm-{{ certificate_id }}/fullchain.pem;
1111
ssl_certificate_key /data/custom_ssl/npm-{{ certificate_id }}/privkey.pem;
12-
{% endif %}
13-
{% endif %}
12+
{%- endif -%}
13+
{%- endif -%}

backend/templates/stream.conf

+7-13
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
{% if enabled %}
66
{% if tcp_forwarding == 1 or tcp_forwarding == true -%}
77
server {
8-
listen {{ incoming_port }}{% if certificate %} ssl{% endif %};
9-
{% if ipv6 -%}
10-
listen [::]:{{ incoming_port }}{% if certificate %} ssl{% endif %};
11-
{% else -%}
12-
#listen [::]:{{ incoming_port }}{% if certificate %} ssl{% endif %};
13-
{% endif %}
8+
listen {{ incoming_port }} {%- if certificate %} ssl {%- endif %};
9+
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} {%- if certificate %} ssl {%- endif %};
1410

15-
{% include "_certificates_stream.conf" %}
11+
{%- include "_certificates_stream.conf" %}
1612

1713
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
1814

@@ -21,14 +17,12 @@ server {
2117
include /data/nginx/custom/server_stream_tcp[.]conf;
2218
}
2319
{% endif %}
24-
{% if udp_forwarding == 1 or udp_forwarding == true %}
20+
21+
{% if udp_forwarding == 1 or udp_forwarding == true -%}
2522
server {
2623
listen {{ incoming_port }} udp;
27-
{% if ipv6 -%}
28-
listen [::]:{{ incoming_port }} udp;
29-
{% else -%}
30-
#listen [::]:{{ incoming_port }} udp;
31-
{% endif %}
24+
{% unless ipv6 -%} # {%- endunless -%} listen [::]:{{ incoming_port }} udp;
25+
3226
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
3327

3428
# Custom

0 commit comments

Comments
 (0)