diff --git a/templates/http/modules.j2 b/templates/http/modules.j2 index 190a3fd..c229e59 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'] }};