diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 1b8bdc9040..563982b31b 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -607,7 +607,7 @@ stream { {{ range $i, $tcpServer := .TCPBackends }} upstream tcp-{{ $tcpServer.Port }}-{{ $tcpServer.Backend.Namespace }}-{{ $tcpServer.Backend.Name }}-{{ $tcpServer.Backend.Port }} { {{ range $j, $endpoint := $tcpServer.Endpoints }} - server {{ $endpoint.Address }}:{{ $endpoint.Port }}; + server {{ $endpoint.Address | formatIP }}:{{ $endpoint.Port }}; {{ end }} } server { @@ -636,7 +636,7 @@ stream { {{ range $i, $udpServer := .UDPBackends }} upstream udp-{{ $udpServer.Port }}-{{ $udpServer.Backend.Namespace }}-{{ $udpServer.Backend.Name }}-{{ $udpServer.Backend.Port }} { {{ range $j, $endpoint := $udpServer.Endpoints }} - server {{ $endpoint.Address }}:{{ $endpoint.Port }}; + server {{ $endpoint.Address | formatIP }}:{{ $endpoint.Port }}; {{ end }} }