From 324f06984409f0bc755175ab9778ab4ba5022a44 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 13 Mar 2024 15:35:49 +0300 Subject: [PATCH] following-error-fix --- nginx.conf.sigil | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 1a7755cb..d5c64ecd 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -11,17 +11,10 @@ map $http_origin $allow_origin { } {{ range $port_map := .PROXY_PORT_MAP | split " " }} - {{ $port_map_list := $port_map | split ":" }} - {{ printf "Processing port map: %s\n" $port_map }} - {{ if ge (len $port_map_list) 3 }} - {{ $scheme := index $port_map_list 0 }} - {{ $listen_port := index $port_map_list 1 }} - {{ $upstream_port := index $port_map_list 2 }} - {{ printf "Scheme: %s, Listen Port: %s, Upstream Port: %s\n" $scheme $listen_port $upstream_port }} - {{ else }} - {{ printf "Invalid port map entry: %s\n" $port_map }} - {{ end }} -{{ end }} +{{ $port_map_list := $port_map | split ":" }} +{{ $scheme := index $port_map_list 0 }} +{{ $listen_port := index $port_map_list 1 }} +{{ $upstream_port := index $port_map_list 2 }} server { {{ if eq $scheme "http" }}