1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-24 03:49:27 +02:00
Mailu/core/nginx/conf/proxy.conf
Florent Daigniere c701358c9d simplify
2024-04-08 09:09:43 +02:00

34 lines
1.0 KiB
Plaintext

# Default proxy setup
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Port $remote_port;
proxy_hide_header True-Client-IP;
proxy_hide_header CF-Connecting-IP;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
{% if (REAL_IP_HEADER or (PROXY_PROTOCOL_80 or PROXY_PROTOCOL_443)) and REAL_IP_FROM %}
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-By $realip_remote_addr;
{% else %}
proxy_set_header X-Forwarded-For $remote_addr;
proxy_hide_header X-Forwarded-By;
{% endif %}
proxy_http_version 1.1;
proxy_hide_header Forwarded;
proxy_hide_header X-Forwarded-Host;
proxy_hide_header X-Forwarded-Server;
proxy_hide_header X-Host;
proxy_hide_header X-HTTP-Host-Override;
proxy_hide_header X-Original-URL;
proxy_hide_header X-Rewrite-URL;
proxy_hide_header X-URL;
proxy_hide_header X-HTTP-Method;
proxy_hide_header X-HTTP-Method-Override;
proxy_hide_header X-Method;
proxy_hide_header X-Method-Override;
proxy_hide_header X-Remote-User;
proxy_hide_header X-Script-Name;