From 9803c51d5591cd322dc9f48403818e2402941983 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sat, 28 Jan 2023 18:23:10 +0100 Subject: [PATCH] Use a hostname --- webmails/nginx-webmail.conf | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/webmails/nginx-webmail.conf b/webmails/nginx-webmail.conf index 1bc00912..fde7adfd 100644 --- a/webmails/nginx-webmail.conf +++ b/webmails/nginx-webmail.conf @@ -1,6 +1,7 @@ server { listen 80 default_server; listen [::]:80 default_server; + resolver {{ RESOLVER }} valid=30s; {% if WEBMAIL == 'roundcube' %} root /var/www/{{ WEBMAIL }}/public_html; @@ -27,12 +28,7 @@ server { 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 %} + set_real_ip_from {{ FRONT_ADDRESS or "front" }}; location / { try_files $uri $uri/ /index.php$args;