Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Using IIS to serve Node/Express API with Reverse Proxy. Problems getting IP client's IP address

I have a node application that is being served by IIS. I followed this guide and it its all working perfectly:

https://dev.to/petereysermans/hosting-a-node-js-application-on-windows-with-iis-as-reverse-proxy-397b

Im having an issue I understand why its happening with the IP address (because of reverse routing, NODE its tracking 127.0.0.1 instead of the client's IP).

At Node, Im getting the IP as follows:

const ipAddress = req.socket.remoteAddress;

Is there a way from Node to identify the IP address that is hitting IIS?

Thanks.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you are reverse proxying, you can do this:

const ipAddress = req.headers['x-forwarded-for'] || req.socket.remoteAddress

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!