Skip to content

Commit 2b5cb09

Browse files
authored
Respect proxy env vars (#37)
aiohttp by default does not respect the proxy env vars: https://docs.aiohttp.org/en/stable/client_advanced.html#aiohttp-client-proxy-support Go ahead and enable reading from the env vars, like the requests package and curl does
1 parent 157a6ea commit 2b5cb09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

boostedblob/globals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _create_session() -> aiohttp.ClientSession:
223223
# While the sleep suggested doesn't work, it does indicate that this is a problem for
224224
# aiohttp in general.
225225
connector = aiohttp.TCPConnector(limit=1024, ttl_dns_cache=60)
226-
return aiohttp.ClientSession(connector=connector)
226+
return aiohttp.ClientSession(connector=connector, trust_env=True)
227227

228228

229229
@contextlib.asynccontextmanager

0 commit comments

Comments
 (0)