nginx forward headers code example
Example 1: nginx set x-forwarded-for
proxy_set_header X-Forwarded-For $remote_addr;
Example 2: nginx set header x-real-ip
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;