# Forwarding Client IP through Nginx proxy

**URL:** <https://forum.inductiveautomation.com/t/forwarding-client-ip-through-nginx-proxy/102340>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 13, 2025, 9:45pm UTC](https://forum.inductiveautomation.com/t/forwarding-client-ip-through-nginx-proxy/102340 "2025-02-13T21:45:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SWoollett](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@SWoollett](https://forum.inductiveautomation.com/u/SWoollett)\
**Post date:** [February 13, 2025, 9:45pm UTC](https://forum.inductiveautomation.com/t/forwarding-client-ip-through-nginx-proxy/102340/1 "2025-02-13T21:45:39Z")

</div>

Hi all,  
We are currently trialing using Nginx as a load balancer / proxy.  
We are able to access out perspective project and unsurprisingly our session is receiving the client IP as the proxy server.

I see this has been discussed a few times previously

> [@Perspective - Scripting - Get Computer name and IP of client](https://forum.inductiveautomation.com/t/perspective-scripting-get-computer-name-and-ip-of-client/49626/11):
>
> Keep in mind that this operation works on the IP address of the TCP (http) connection to the server from the Server’s perspective. Clients behind a NAT firewall will be seen as the firewall’s IP, and with the name of the firewall via reverse DNS. Users familiar with Vision’s total access to the local computer will forever be disappointed at the lack of access via browsers.

However, upon some research I see Nginx can forward the client IP to a HTTP request header using X-Real-IP and X-Forwarded-For

- [Forward IP Addresses with NGINX Proxy – Calvin Bui](https://calvin.me/forward-ip-addresses-when-using-nginx-proxy/)
- [Nginx: reverse proxy passing client IP to the server - Server Fault](https://serverfault.com/questions/920030/nginx-reverse-proxy-passing-client-ip-to-the-server)

They also state "Check your back-end application if they support any of these headers". So the question is, Will Ignition Perspective support these headers when using `session.props.address` and `session.props.host`  
If not could this be added to Ignitions functionality in the future?

We'll test this and I'll post my findings here for future reference. If anyone else has some experience with this I would love hear it!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2025, 10:03pm UTC](https://forum.inductiveautomation.com/t/forwarding-client-ip-through-nginx-proxy/102340/2 "2025-02-13T22:03:16Z")

</div>

There is a setting for trusting proxy headers in Ignition.

On the Config =\> Networking =\> Web Server page of your gateway.
