paulbsd-salt/states/nginx/templates/access.j2
Paul Lecuq dec9fc6770
All checks were successful
continuous-integration/drone/push Build is passing
updated nginx state
2022-10-10 10:19:42 +02:00

14 lines
477 B
Django/Jinja

## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "nginx/map.jinja" import net with context %}
real_ip_header X-Forwarded-For;
geo $allow {
{%- for key, value in net.ipv4_networks.items() %}
#allow {{ value.ip }}/{{ value.mask }};
{{ value.ip }}/{{ value.mask }} 1;
{%- endfor %}
{%- for key, value in net.ipv6_networks.items() %}
#allow {{ value.ip }}/{{ value.mask }};
{{ value.ip }}/{{ value.mask }} 1;
{%- endfor %}
default 0;
}