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

fix(client): Fix redirect fails proxy authentification #2521

Closed
wants to merge 2 commits into from

Conversation

0x676e67
Copy link

@0x676e67 0x676e67 commented Jan 8, 2025

close: #2177

@0x676e67
Copy link
Author

0x676e67 commented Jan 8, 2025

It looks like the Proxy-Authorization header is being removed here, let's add it back.

headers.remove(PROXY_AUTHORIZATION);

@0x676e67 0x676e67 marked this pull request as draft January 10, 2025 03:57
@0x676e67
Copy link
Author

I looked into the browser’s redirection policy, specifically when redirecting to cross-origin websites. If a proxy is used, a pop-up window will appear requiring the user to manually authorize credentials and trust the site. Regardless, this might be an issue that needs addressing. Perhaps adding a client-side setting to support reauthorizing the proxy during cross-origin redirection could be a potential solution.

@seanmonstar
Copy link
Owner

Could you look into how other client libraries do it, that aren't necessarily user-agents? curl, golang, python-requests, etc?

@0x676e67
Copy link
Author

I reviewed the related issues reported for fetch and curl. What reqwest does is correct—when dealing with cross-origin hosts, we should indeed strip the PROXY_AUTHORIZATION header. If users trust the target host, they can handle the redirection themselves. I will close draft.

@0x676e67 0x676e67 closed this Jan 11, 2025
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.

Redirects fails proxy authentification
2 participants