Fix IP address detection bug when behind nginx

Kind of a trivial fix.
Nginx forwards the origin IP address in the <code>X-Forwarded-For</code> HTTP header, so we need to use this one when behind it.

@twidi, care to review? :smile: