mirror of
https://github.com/wowlikon/LiB.git
synced 2026-03-21 23:53:38 +00:00
исправление обработки 404
This commit is contained in:
@@ -72,6 +72,7 @@ async def require_captcha(request: Request):
|
||||
token = request.cookies.get("capjs_token")
|
||||
if not token or token not in redeem_tokens or redeem_tokens[token] < now_ms():
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN, detail={"error": "captcha_required"}
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail={"error": "captcha_required"},
|
||||
)
|
||||
del redeem_tokens[token]
|
||||
|
||||
Reference in New Issue
Block a user