Skip to content

Proxy headers #75

Closed
Closed

Description

@yeraydiazdiaz

There's a discrepancy in how we deal with proxy headers between the two proxy modes.

Currently forwading extends the headers in the request with the proxy_headers argument, but tunneling only includes the proxy_headers. This forces the user into carefully constructing the proxy headers argument depending on the proxy mode which is annoying and also may result in unexpected errors when using the default proxy mode and requesting a mix of HTTP and HTTPS URLs.

Activity

  1. yeraydiazdiaz commented on May 4, 2020

    @yeraydiazdiaz
    ContributorAuthor

    To give some context, the proxy_headers are the headers passed down from the httpx.Proxy instances into the httpcore.AsyncHTTPProxy. These headers are set ahead of time as a global "session" configuration by the user as opposed to in a per-request basis, I imagine these being authentication or API-key headers.

    I think we should not expect the user to include per-request headers (although we should respect them if they are there), and that httpcore should include the host header in the request headers if necessary and do some minimal cleanup (like preventing encode/httpx#921).

  2. yeraydiazdiaz commented on May 6, 2020

    @yeraydiazdiaz
    ContributorAuthor

    Closed via #77

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions