Dashboard socketip: '<socketip>'

Hello,
I'm currently rebuilding my Node-RED setup and have switched to Dashboard 2. Now I'm painstakingly migrating my Dashboard 1 flows to Dashboard 2, but I'm stuck with the ui-control node.

Previously, I was able to log which user made changes on the dashboard by capturing socketip: '<socketip>' via the "ui control" node. But now, with Dashboard 2, all clients only show 127.0.0.1 as their IP address, so I can't tell who is doing what anymore.

Does anyone know how to get the real client IP address again? Could this be because the old dashboard was running on HTTP, and now Dashboard 2 is on HTTPS?

Thanks a lot,
edstobi

hi @edstobi, you didn't mention if you are running behind a reverse proxy, but I suspect you are, so my response is based on that assumption. Unfortunately, there is currently no logic to extract the x-forwarded-for header and use that as the ip address. Also, changing the values in settings.js to trust proxy only works for the http responses and does not have any effect on socket .io being used by the dashboard, in case you were going to try that.

// has no effect on dashboard socketip
httpServerOptions: {
  'trust proxy': true,
},

You might need to request an enhancement to the source code for flowfuse dashboard to inherit the values from settings.js or have its own settings implementation so that it can be set to check for the headers when behind a reverse proxy.