From 35606a46e4f52c3325747348ea31947a7b4d1f7c Mon Sep 17 00:00:00 2001 From: Pascal Iske Date: Tue, 15 Sep 2026 21:53:56 +0200 Subject: [PATCH] fix(nginx): correctly split comma separated values for set real ip from Signed-off-by: Pascal Iske --- nginx/files/02-real-ip.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nginx/files/02-real-ip.sh b/nginx/files/02-real-ip.sh index 8719e915..180c92dc 100755 --- a/nginx/files/02-real-ip.sh +++ b/nginx/files/02-real-ip.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # -*- coding: utf-8 -*- -set -eu +set -feu CONF="${NGINX_INCLUDE_DIR}/real-ip.conf" @@ -22,8 +22,7 @@ real_ip_recursive on; EOF # append each cidr as set_real_ip_from directive -set -- "${NGINX_SET_REAL_IP_FROM:-}" -for CIDR in "$@"; do +for CIDR in ${NGINX_SET_REAL_IP_FROM:-}; do # trim leading/trailing whitespace CIDR=$(echo "${CIDR}" | sed 's/^ *//; s/ *$//')