How to get client ip from node.js express application deployed on AWS Elastic beanstalk?


I am using elastic beanstalk with ngnix proxy server. my application code was on node.js express framework. I am trying to access client ip via following code

but i always getting same client ip for all incoming request. I think it will be the proxy server’s ip address.

How to access real client address from my application???


I defer with @austince, the Client IP will be the first entry in the list for Elastic Beanstalk.



In case anyone, come looking for example code, here is what I have used in my project.

Leave a Reply