-1

I am currently working on module which has the following architecture:

When a client makes a request it is forwarded to a node server which has a ELB in front of it. The node server gets the data from backend .NET code hosted in another server with a different call.

Is it possible to access the client IP in the backend code written in .NET considering this architecture?

Mike Zavarello
  • 3,514
  • 4
  • 29
  • 43

1 Answers1

0

you can get ip in node

In your request object there is a property called connection, which is a net.Socket object. The net.Socket object has a property remoteAddress but it may be possible ip server is behind proxy server so try the below code to get IP

request.headers['x-forwarded-for']

Check the below Stack Link for more answers

How to determine a user's IP address in node

Community
  • 1
  • 1
Heemanshu Bhalla
  • 3,603
  • 1
  • 27
  • 53