Better detection of remote IP address when running behind a proxy like Nginx