paulbsd-salt/states/nginx/templates/access.j2

14 lines
477 B
Plaintext
Raw Normal View History

2020-07-10 00:58:55 +02:00
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
2021-08-19 09:55:49 +02:00
{%- from "nginx/map.jinja" import net with context %}
2022-10-10 10:19:42 +02:00
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;
}