From c36b7f94004aea6b4306eb0752cfc29ef5d8c485 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 27 Aug 2025 18:43:00 +0800 Subject: [PATCH] bugfix --- dapi/dapi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dapi/dapi.py b/dapi/dapi.py index 58863d1..ab8345a 100644 --- a/dapi/dapi.py +++ b/dapi/dapi.py @@ -55,12 +55,12 @@ where a.userid = b.id return rec async def bearer_auth(sor, request): - auth = request.headers.get('Authentication') + auth = request.headers.get('Authorization') if auth is None: - debug(f'headers has not "Authentication"') + debug(f'headers has not "Authorization"') return None if not auth.startswith('Bearer '): - debug(f'"Authentication" not starts with "Bearer "') + debug(f'"Authorization" not starts with "Bearer "') return None apikey = auth[7:] client_ip = request['client_ip'] @@ -75,7 +75,7 @@ async def apikey_user(sor, apikey, client_ip): return user.id async def deerer_auth(sor, request): - auth = request.headers.get('Authentication') + auth = request.headers.get('Authorization') if auth is None: return None if not auth.startswith('Deerer '):