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

Optionally support X-Forwarded-For in both HTTP and WebSocket transports (fixes #3158) #3160

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

lminiero
Copy link
Member

@lminiero lminiero commented Feb 8, 2023

See #3158 for rationale. This patch allows both HTTP and WebSocket transports to optionally inspect the X-Forwarded-For header in requests to check whether or not a request is allowed by the transport's ACL rules. The support is optional and disabled by default to avoid abuses, since spoofing the header is trivial: as such, it should only be configured if a proxy is indeed in front of Janus, it's the only one able to talk to Janus, and there's reasons to filter clients contacting the proxy.

I haven't checked if the APIs I used require specific versions of MHD or libwebsockets. I'll wait for our Github Actions to see if the ones we use normally do support them. Feedback welcome, as usual.

@lminiero lminiero added the multistream Related to Janus 1.x label Feb 9, 2023
@lminiero
Copy link
Member Author

lminiero commented Feb 9, 2023

Adding the multistream label as that's what this PR is from, but I'll backport it to 0.x once merged.

@lminiero
Copy link
Member Author

Merging.

@lminiero lminiero merged commit 961b576 into master Feb 14, 2023
@lminiero lminiero deleted the x-forwarded-for branch February 14, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant