Misc: allow to use proxy in HTTPConnection (#12042)

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
This commit is contained in:
Yuan 2025-01-15 21:16:40 +08:00 committed by GitHub
parent 97eb97b5a4
commit 5ecf3e0aaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ class HTTPConnection:
# required, so that the client is only accessible inside async event loop
async def get_async_client(self) -> aiohttp.ClientSession:
if self._async_client is None or not self.reuse_client:
self._async_client = aiohttp.ClientSession()
self._async_client = aiohttp.ClientSession(trust_env=True)
return self._async_client