Flowfuse Dashboard SocketIp with wireguard

Hello, I have the following problem:

I have two servers connected via WireGuard. Server 1 is running "Node-Red" with the FlowFuse Dashboard, while Server 2 is running an NGINX server.

Here's the NGINX configuration.

  location /dashboard {
    add_header X-Client-IP $remote_addr;
    proxy_pass http://10.0.0.2:1880/dashboard;
    proxy_http_version  1.1;
    proxy_cache_bypass  $http_upgrade;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Port $server_port;
  }

When opening a dashboard page from the internet and checking the UI-control debug...

msg : Object
payload: "connect"
_client: object
{
  socketId: "bN9KYr7qntlYVpl_AAAB"
  socketIp: "10.0.0.1"
}
_msgid: "07e64a4f673bc9d3"

Do you know how I can get the real IP address into the socketIp (or any other method)?

Thank you!

For the network the Wireguard IP is the real IP. I think the only way it to submit the LAN IP from the Nginx server somehow (dont know the possibilities of Nginx) to Node Red and replace socketIp value with the transmitted one with a function node.

Because the NGINX reverse proxy makes a seperate http request to your backend, the real ip from the client is propably useless in the node-red backend.

The backend can't connect directly to the client, because there are not established connections from you backend to the client.
(Please correct me if im wrong :see_no_evil: )

Like @WhiteLion said, you can access the Headers from a function node from a http in Node