Galaxy hosted app picking up wrong user IP

My customers are complaining about invalid geoIP information (their own IPs, even, showing up in different states). I think this has to do with CloudFlare. In the this.connection object on the server, the clientAddress is wrong, and this.connection.httpHeaders['x-forwarded-for'] contains the true IP address followed by a comma, space, and the CloudFlare IP.

I seem to recall some kind of setting in settings.json you could set… HTTP_FORWARD_COUNT or something? Would that fix this?

Until then, I’m just quickly patching this thing up to use the x-forwarded-for field until I have a more elegant solution.


Not an answer to your question - but we use the same object currently. Even though the format is odd, it is reliable/industry standard from what I researched and have seen.

1 Like