Skip to content

Commit 0da879b

Browse files
authored
Don't overwrite default transport so proxies can be set via environment variables (#398)
1 parent ed488a9 commit 0da879b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

workos/utils/http_client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def __init__(
3838
client_id: str,
3939
version: str,
4040
timeout: Optional[int] = None,
41-
transport: Optional[httpx.BaseTransport] = httpx.HTTPTransport(),
41+
# If no custom transport is provided, let httpx use the default
42+
# so we don't overwrite environment configurations like proxies
43+
transport: Optional[httpx.BaseTransport] = None,
4244
) -> None:
4345
super().__init__(
4446
api_key=api_key,
@@ -136,7 +138,9 @@ def __init__(
136138
client_id: str,
137139
version: str,
138140
timeout: Optional[int] = None,
139-
transport: Optional[httpx.AsyncBaseTransport] = httpx.AsyncHTTPTransport(),
141+
# If no custom transport is provided, let httpx use the default
142+
# so we don't overwrite environment configurations like proxies
143+
transport: Optional[httpx.AsyncBaseTransport] = None,
140144
) -> None:
141145
super().__init__(
142146
base_url=base_url,

0 commit comments

Comments
 (0)