Skip to content

Make NoPrivateNetworkHttpClient & proxy usage work better together #47387

@mathroc

Description

@mathroc

Description

When using the NoPrivateNetworkHttpClient and there is a proxy set (eg: auto-discovered with the HTTPS_PROXY env var), if the proxy is local the request is blocked by the NoPrivateNetworkHttpClient.

I believe it would make sense to automatically authorize the proxy in this case, or skip the NoPrivateNetworkHttpClient entirely.

It's hard to figure out if we should skip adding NoPrivateNetworkHttpClient because the HttpClientInterface can't tell us if it's using a proxy or not. Even getting the inner client options and reproducing the logic it uses to figure out if and which proxy to use is not easy.

Ideally, the NoPrivateNetworkHttpClient could ask the inner client if it's using a proxy or not and not do anything when a proxy is used.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions