I want something to determine the real IP address of the visitor.
The script includes both X_REAL_IP and X_FORWARDED_FOR. I'm just wondering which one I should check first to get the best possible result?
Any thought?
[edit] I'll be more specific.
How and when Nginx can set both w_real_ip and x_forwarded_for? Which one should I read when both are set? Does it depend on server configuration?