check for realip module
This commit is contained in:
parent
4f0aa05b6f
commit
def291d210
@ -13,7 +13,7 @@ events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
{% if 'set_real_ips' in nginx -%}
|
{% if 'set_real_ips' in nginx and salt['cmdmod.retcode']('nginx -V 2>&1 | grep http_realip_module') == 0 -%}
|
||||||
{% for ip in nginx.get('set_real_ips', {}).get('ips', []) -%}
|
{% for ip in nginx.get('set_real_ips', {}).get('ips', []) -%}
|
||||||
set_real_ip_from {{ ip }};
|
set_real_ip_from {{ ip }};
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
Loading…
Reference in New Issue
Block a user