Skip to content

Strip proxy-authorization header by default.#348

Merged
ioquatix merged 2 commits into
socketry:mainfrom
FletcherDares:main
May 27, 2026
Merged

Strip proxy-authorization header by default.#348
ioquatix merged 2 commits into
socketry:mainfrom
FletcherDares:main

Conversation

@FletcherDares

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown

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.

@ioquatix ioquatix merged commit 170c415 into socketry:main May 27, 2026
35 of 36 checks passed
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.

4 participants