up
This commit is contained in:
parent
dc20588b18
commit
2adedd9e6f
2
main.py
2
main.py
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user