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

feat: Block CONNECT requests for improved security #218

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

xkr47
Copy link
Contributor

@xkr47 xkr47 commented Nov 9, 2024

Hi, I found that the CONNECT http method is not blocked by rpxy. And imho it does not make sense to support them in a reverse proxy. So this PR just blocks all CONNECT requests outright.

But before I implemented that I tested it out, and rpxy did forward some of the test requests to the backend but did not handle 200 responses correctly, leaving the client and/or the server in funny situations (at least with HTTP/1.1).

Quoting the comment I added in the code:
// Block CONNECT requests because a) makes no sense to run a forward proxy behind a reverse proxy = fringe use case b) might have serious security implications for badly configured upstreams c) it doesn't work with current implementation (bodies are not forwarded)

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.

1 participant