Compare commits
No commits in common. "2eba8e91e729a7ca4a235c4f6fe24f56abd8d04d" and "9adc0d77ce6852e90c6013635bbe346b73b16041" have entirely different histories.
2eba8e91e7
...
9adc0d77ce
2
main.py
2
main.py
@ -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:
|
||||||
return fastapi.JSONResponse(status_code=403, content={'message': 'token is not provided or incorrect'})
|
raise fastapi.HTTPException(403)
|
||||||
return await call_next(request)
|
return await call_next(request)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user