From 72f349cdf2223080de99ebd63f284994fd86e90a Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 11 Jun 2024 22:20:50 +0100 Subject: [PATCH] Remove the need to trust env --- src/cogs/ollama.py | 4 ++-- src/cogs/quote_quota.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 3be2dcd..58f21fe 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -1108,7 +1108,7 @@ class Ollama(commands.Cog): r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2/api") username = CONFIG["truth"].get("username", "1") password = CONFIG["truth"].get("password", "2") - async with httpx.AsyncClient(base_url=r, auth=(username, password)) as http_client: + async with httpx.AsyncClient(base_url=r, auth=(username, password), trust_env=False) as http_client: response = await http_client.get( "/truths", timeout=60, @@ -1370,7 +1370,7 @@ class Ollama(commands.Cog): """ Fetches a specific truth post by ID. """ - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(trust_env=False) as client: r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2/api") username = CONFIG["truth"].get("username", "1") password = CONFIG["truth"].get("password", "2") diff --git a/src/cogs/quote_quota.py b/src/cogs/quote_quota.py index a39781f..8cf9a03 100644 --- a/src/cogs/quote_quota.py +++ b/src/cogs/quote_quota.py @@ -335,7 +335,7 @@ class QuoteQuota(commands.Cog): timestamp=now, ) await ctx.respond(embed=embed) - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(trust_env=False) as client: r = CONFIG["truth"].get("api", "https://bots.nexy7574.co.uk/jimmy/v2/api") username = CONFIG["truth"].get("username", "1") password = CONFIG["truth"].get("password", "2")