Иво Стратев Иво Стратев - 1 year ago 65
Node.js Question

How to get real request client's ip from App Engine

I have set

app.set('trust_proxy', 1);
just like this page suggests
but for each request it gives the following ip address ...

req.ip =>
req.ips => [ '' ]

Headers suggested headers are also with the same value ...
So how do I get the ip because all "what is my ip" sites tells me that my ip is

So how do i get my real ip in App Engine ?

ps. I'm using custom docker container for my app if that matters (I think it dosen't but still) I have migrated from heroku where it needs
and it did work.


You can use the x-appengine-user-ip header directly:

var ip = req.headers['x-appengine-user-ip'];