According GCP doc, https://cloud.google.com/load-balancing/docs/https#target-proxies,
X-Forwarded-For contains multiple IPs, eg
22.214.171.124, 126.96.36.199, where
188.8.131.52 is the real client IP,
184.108.40.206 is the CLB IP.
How can I get
nginx.conf? I want to use it with geoip.
You can use the real IP module to break down
X-Forwarded-For and set the
$remote_addr variable with the proper value.
set_real_ip_from 220.127.116.11; real_ip_header X-Forwarded-For; real_ip_recursive on;
The value of
$remote_addr is changed from
In many distributions of Nginx, this module is already present. Use
nginx -V to confirm which modules are present.