Skip to content

Strip proxy-authorization header by default.#348

Open
FletcherDares wants to merge 2 commits into
socketry:mainfrom
FletcherDares:main
Open

Strip proxy-authorization header by default.#348
FletcherDares wants to merge 2 commits into
socketry:mainfrom
FletcherDares:main

Conversation

@FletcherDares
Copy link
Copy Markdown

Summary

Strip Proxy-Authorization in the proxy middleware before forwarding requests upstream.

Forwarding the Proxy-Authorization it through Falcon's reverse proxy can expose proxy credentials to upstream applications that did not request them. It should also be stripped under RFC 7235 S4.4

Comment thread test/falcon/middleware/proxy.rb Outdated
@samuel-williams-shopify samuel-williams-shopify changed the title String proxy-authorization header by default Strip proxy-authorization header by default. May 14, 2026
@ioquatix ioquatix requested a review from Copilot May 24, 2026 01:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens Falcon’s proxy middleware by ensuring the Proxy-Authorization header is stripped before forwarding requests upstream, preventing unintended exposure of proxy credentials and aligning with RFC 7235 §4.4.

Changes:

  • Add proxy-authorization to the proxy middleware’s hop-by-hop header removal list.
  • Add a middleware unit test verifying proxy-authorization is removed while preserving authorization.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/falcon/middleware/proxy.rb Strips proxy-authorization as a hop-by-hop header during header preparation.
test/falcon/middleware/proxy.rb Adds coverage to ensure proxy-authorization is removed by default.

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.

3 participants