From e415add5d3dffc8c3f2cc3871156165b2e408796 Mon Sep 17 00:00:00 2001 From: Grant Byers Date: Thu, 21 Mar 2024 11:09:07 +1000 Subject: [PATCH] Fix for issue #415: set_real_ip_from (ngx_http_realip_module) should be a list --- templates/http/modules.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/http/modules.j2 b/templates/http/modules.j2 index 190a3fd6..c229e59b 100644 --- a/templates/http/modules.j2 +++ b/templates/http/modules.j2 @@ -255,7 +255,11 @@ mirror_request_body {{ mirror['request_body'] | ternary('on', 'off') }}; {# NGINX HTTP RealIP -- ngx_http_realip_module #} {% macro realip(realip) %} {% if realip['set_real_ip_from'] is defined %} +{% for set_real_ip_from in realip['set_real_ip_from'] if realip['set_real_ip_from'] is not string %} +set_real_ip_from {{ set_real_ip_from }}; +{% else %} set_real_ip_from {{ realip['set_real_ip_from'] }}; +{% endfor %} {% endif %} {% if realip['real_ip_header'] is defined %} real_ip_header {{ realip['real_ip_header'] }};