Skip to content

Add authorization header handling in proxy middleware #2787

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 2 commits into
base: master
Choose a base branch
from

Conversation

v1k45
Copy link

@v1k45 v1k45 commented Jun 3, 2025

Problem

When a proxy target URL contains User credentials, proxy middleware does not send request with the authorization header. This can lead to UnAuthorized Error (401) when connecting to upstream server.

Solution

  • Implemented logic to pass the Authorization header to the target if the proxy URL includes user credentials.
  • Added unit tests to verify behavior for both scenarios: with and without user credentials in the proxy URL.

v1k45 added 2 commits June 3, 2025 18:50
- Implemented logic to pass the Authorization header to the target if the proxy URL includes user credentials.
- Added unit tests to verify behavior for both scenarios: with and without user credentials in the proxy URL.
…ernals

- Add support and test for WebSockect authorization handling
- Cleanup
@v1k45 v1k45 force-pushed the v1k45/proxy-auth-fix branch from 0468d61 to 664ceba Compare June 3, 2025 13:37
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