Option to get `socketIp` via custom headers
Description
Hi
Regarding the field socketIp that is added to each message in the _client property. If using reverse proxys the client IP is always 127.0.0.1 .
Would it be possible to have a dashboard setting to indicate if we want to use the default conn.handshake?.address or to get it by some header like conn.handshake.headers["x-forwarded-for"]?
Cloudfare for example uses header CF-Connecting-IP.
Have you provided an initial effort estimate for this issue?
I am no FlowFuse team member
This feels like something that would live in the Node-RED settings.js, rather than a UI-surfaced configuration
Yes, it can be something in settings, like a custom callback to be called on io.on("connection", (socket), like the example here -> https://socket.io/how-to/get-the-ip-address-of-the-client. It can be defined in the same way as httpAdminMiddleware for example, but eventually in a section dedicated to dashboard.
Alternatively socketIp could always be primarily set by headers like X-Forwarded-For and X-Real-IP. Only if those are missing, use the handshake address? Would this affect existing flows?