Skip to content

Commit 3748661

Browse files
authored
Only set stream status zone if hostname exists (#2684)
Problem: Noticed during conformance tests, the stream server blocks did not have a hostname, and therefore the status_zone value was empty and invalid. Solution: Only set the status_zone directive if it has a value.
1 parent 7644959 commit 3748661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/mode/static/nginx/config/stream_servers_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ server {
1313
{{- range $address := $s.RewriteClientIP.RealIPFrom }}
1414
set_real_ip_from {{ $address }};
1515
{{- end}}
16-
{{- if $.Plus }}
16+
{{- if and $.Plus $s.StatusZone }}
1717
status_zone {{ $s.StatusZone }};
1818
{{- end }}
1919

0 commit comments

Comments
 (0)