From 3748661fbe8b623cd9cdba1af04104215f738132 Mon Sep 17 00:00:00 2001 From: Saylor Berman Date: Sat, 12 Oct 2024 00:43:23 +0300 Subject: [PATCH] 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. --- internal/mode/static/nginx/config/stream_servers_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/mode/static/nginx/config/stream_servers_template.go b/internal/mode/static/nginx/config/stream_servers_template.go index 58a95a70b0..75868bc0de 100644 --- a/internal/mode/static/nginx/config/stream_servers_template.go +++ b/internal/mode/static/nginx/config/stream_servers_template.go @@ -13,7 +13,7 @@ server { {{- range $address := $s.RewriteClientIP.RealIPFrom }} set_real_ip_from {{ $address }}; {{- end}} - {{- if $.Plus }} + {{- if and $.Plus $s.StatusZone }} status_zone {{ $s.StatusZone }}; {{- end }}