Skip to content

Commit

Permalink
Fix for issue nginxinc#415: set_real_ip_from (ngx_http_realip_module)…
Browse files Browse the repository at this point in the history
… should be a list
  • Loading branch information
Grant Byers committed Mar 21, 2024
1 parent 68601af commit e415add
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/http/modules.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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'] }};
Expand Down

0 comments on commit e415add

Please sign in to comment.