Compare commits

...

2 Commits

Author SHA1 Message Date
2eba8e91e7 Merge pull request 'up' (#4) from master into dev
Reviewed-on: #4
2024-11-17 02:35:32 +03:00
2adedd9e6f up
All checks were successful
Deploy Dev / Build (pull_request) Successful in 5s
Deploy Dev / Push (pull_request) Successful in 8s
Deploy Dev / Deploy dev (pull_request) Successful in 6s
2024-11-17 02:35:13 +03:00

View File

@ -19,7 +19,7 @@ async def check_token(request: fastapi.Request, call_next):
if QUEUES_TOKEN: if QUEUES_TOKEN:
token = request.headers.get('X-Queues-Token') token = request.headers.get('X-Queues-Token')
if not token or token != 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) return await call_next(request)