Skip to content

feat: support forwarded headers for websocket #3235

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jclab-joseph
Copy link

@jclab-joseph jclab-joseph commented Mar 14, 2025

Fixes #1437
Also ipfs/kubo#8193

Avoid connection limit issues when there is an ipfs websocket behind a proxy.
Kubo Log:

DEBUG   upgrader        upgrader/listener.go:99 resource manager blocked accept of new connection       {"error": "connections per ip limit exceeded for /ip4/10.42.111.111/tcp/38108/ws"}

@jclab-joseph jclab-joseph changed the title wip: feat: support forwarded headers for websocket feat: support forwarded headers for websocket Mar 14, 2025
Copy link
Collaborator

@MarcoPolo MarcoPolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the general idea here. I think we need to be careful not to open up security vulnerabilities here.

- do not allow any address when trustedProxies is empty
- make the logic to extract the Real Address customizable
@p-shahi p-shahi requested review from MarcoPolo and sukunrt March 31, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

websocket: record X-Real-IP header
3 participants