'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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source