Fix IP-address tracking
Fix IP-address tracking

The X-Forwarded-For HTTP header contains a comma-separated list with the
real client IP address first, followed by the IP addresses of any
intermediate proxies
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For).
A bit of code copied from StackOverflow was taking this header and
taking the last item in the list (which is a proxy) rather than the
first item in the list (which is the desired client IP). Introduced
while converting from Meteor accounts passportjs, in commit
e74a2fa7396ad5e6b1a1ed2ff260eeea8066b9c8.

Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2