nginix set_real_ip_from
This commit is contained in:
@@ -15,12 +15,12 @@ set_real_ip_from 172.22.0.0/16; # Example: Trust IPs from this subnet
|
||||
|
||||
# Which header contains the real client IP?
|
||||
# X-Forwarded-For handles multiple proxies better. X-Real-IP is simpler if only Traefik.
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_header X-Real-IP;
|
||||
|
||||
# If using X-Forwarded-For, tell Nginx how to process it.
|
||||
# 'on' means find the *last* IP address that is NOT from a trusted proxy.
|
||||
# This is usually correct when behind one or more trusted proxies.
|
||||
real_ip_recursive on;
|
||||
real_ip_recursive off;
|
||||
# --- End Real IP Configuration ---
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user