Merge pull request #15510 from kopero2000/bug/oauth_logout_fix

fix/oauth logout fix
This commit is contained in:
Tim Jaeryang Baek 2025-07-04 10:30:02 +04:00 committed by GitHub
commit 600344f2e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View file

@ -507,6 +507,7 @@ class MistralLoader:
timeout=timeout, timeout=timeout,
headers={"User-Agent": "OpenWebUI-MistralLoader/2.0"}, headers={"User-Agent": "OpenWebUI-MistralLoader/2.0"},
raise_for_status=False, # We handle status codes manually raise_for_status=False, # We handle status codes manually
trust_env=True,
) as session: ) as session:
yield session yield session

View file

@ -675,7 +675,7 @@ async def signout(request: Request, response: Response):
oauth_id_token = request.cookies.get("oauth_id_token") oauth_id_token = request.cookies.get("oauth_id_token")
if oauth_id_token: if oauth_id_token:
try: try:
async with ClientSession() as session: async with ClientSession(trust_env=True) as session:
async with session.get(OPENID_PROVIDER_URL.value) as resp: async with session.get(OPENID_PROVIDER_URL.value) as resp:
if resp.status == 200: if resp.status == 200:
openid_data = await resp.json() openid_data = await resp.json()

View file

@ -105,7 +105,7 @@ async def load_function_from_url(
) )
try: try:
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession(trust_env=True) as session:
async with session.get( async with session.get(
url, headers={"Content-Type": "application/json"} url, headers={"Content-Type": "application/json"}
) as resp: ) as resp:

View file

@ -153,7 +153,7 @@ async def load_tool_from_url(
) )
try: try:
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession(trust_env=True) as session:
async with session.get( async with session.get(
url, headers={"Content-Type": "application/json"} url, headers={"Content-Type": "application/json"}
) as resp: ) as resp: