Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to get socketIp via custom headers #1028

Open
arturv2000 opened this issue Jun 25, 2024 · 2 comments
Open

Option to get socketIp via custom headers #1028

arturv2000 opened this issue Jun 25, 2024 · 2 comments
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do

Comments

@arturv2000
Copy link
Contributor

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

@arturv2000 arturv2000 added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do labels Jun 25, 2024
@joepavitt
Copy link
Collaborator

This feels like something that would live in the Node-RED settings.js, rather than a UI-surfaced configuration

@arturv2000
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do
Projects
None yet
Development

No branches or pull requests

2 participants