conf: realip module
This commit is contained in:
8
angie/autoconf/realip-set-from.j2inc
Normal file
8
angie/autoconf/realip-set-from.j2inc
Normal file
@@ -0,0 +1,8 @@
|
||||
{%- set src = (j2cfg.trusted_sources or []) | any_to_str_list | uniq_str_list | ngx_esc -%}
|
||||
{%- if src %}
|
||||
{%- for s in src %}
|
||||
set_real_ip_from {{ s }};
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
set_real_ip_from unix: ;
|
||||
{%- endif %}
|
Reference in New Issue
Block a user