Skip to content

docs: document Authorization header stripping on cross-origin redirects - #3876

Open
meat-daemon-404 wants to merge 1 commit into
encode:masterfrom
meat-daemon-404:docs/redirect-authorization-header-3334
Open

meat-daemon-404 wants to merge 1 commit into
encode:masterfrom
meat-daemon-404:docs/redirect-authorization-header-3334

Conversation

@meat-daemon-404

Copy link
Copy Markdown

Summary

Documents HTTPX's cross-origin Authorization header stripping behavior in docs/quickstart.md under Redirection and History, matching BaseClient._redirect_headers() in httpx/_client.py:

  • When following a redirect to a different origin (scheme, host, or port), HTTPX strips the Authorization header to avoid leaking credentials.
  • Direct HTTP to HTTPS redirects to the same host and default port are preserved.

Fixes #3334

Document in docs/quickstart.md that HTTPX strips the Authorization
header when following redirects to a different origin, except for
direct HTTP to HTTPS redirects to the same host and default port
(matching BaseClient._redirect_headers).

Fixes encode#3334

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Document Authentication header is stripped on redirection

1 participant