up #4

Merged
emmatveev merged 1 commits from master into dev 2024-11-17 02:35:34 +03:00

View File

@ -19,7 +19,7 @@ async def check_token(request: fastapi.Request, call_next):
if QUEUES_TOKEN:
token = request.headers.get('X-Queues-Token')
if not token or token != QUEUES_TOKEN:
raise fastapi.HTTPException(403)
return fastapi.JSONResponse(status_code=403, content={'message': 'token is not provided or incorrect'})
return await call_next(request)