Skip to content

httpx ignores no_proxy and https_proxy in docker-compose #2709

@lsch0lz

Description

@lsch0lz

When I use httpx inside a Docker container that was built with the http_proxy and http_proxy environment variables, I cannot ignore these variables when starting the container via docker-compose.
I set the no_proxy variable when starting the container so that the container should ignore any proxies it was built with.
httpx still uses those proxies. To solve this I had to set trust_env=False in my AsyncClient.

Is this expected behaviour? I thought that disabling the proxies in the docker-compose file would automatically tell httpx to ignore them when making a request.

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