1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-03-03 14:52:36 +02:00

Trust the IP address from the local subnet

This will only work when SUBNET autodetection is merged
This commit is contained in:
Florent Daigniere 2023-01-28 17:37:16 +01:00
parent 760ec301e3
commit 6533f41f48

View File

@ -26,6 +26,14 @@ server {
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header Referrer-Policy "no-referrer" always;
real_ip_header X-Real-IP;
{% for from_ip in SUBNET.split(',') %}
set_real_ip_from {{ from_ip }};
{% endfor %}
{% if SUBNET6 %}{% for from_ip in SUBNET6.split(',') %}
set_real_ip_from {{ from_ip }};
{% endfor %}{% endif %}
location / {
try_files $uri $uri/ /index.php$args;
}