Skip to content

Commit

Permalink
Enable "trust_env"
Browse files Browse the repository at this point in the history
  • Loading branch information
ateska authored Jan 31, 2024
1 parent f3c2c67 commit 4eb849d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion asab/library/providers/libsreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ def __init__(self, library, path, layer):
) for netloc in url.netloc.split(',')]
assert len(self.URLs) > 0

# TODO: Read this for `[general]` config
self.TrustEnv = True

tempdir = tempfile.gettempdir()
self.RootPath = os.path.join(
tempdir,
Expand Down Expand Up @@ -105,7 +108,7 @@ async def _periodic_pull(self, event_name):
url = random.choice(self.URLs)

try:
async with aiohttp.ClientSession() as session:
async with aiohttp.ClientSession(trust_env=self.TrustEnv) as session:
async with session.get(url, headers=headers) as response:

if response.status == 200: # The request indicates a new version that we don't have yet
Expand Down

0 comments on commit 4eb849d

Please sign in to comment.