Revert "add another ratelimit by username"

This reverts commit 4385bafa85.
master
Aevann1 2022-10-28 20:25:14 +02:00
parent 4385bafa85
commit 449c8b51cb
1 changed files with 2 additions and 2 deletions

View File

@ -80,8 +80,8 @@ def login_deduct_when(resp):
return g.login_failed
@app.post("/login")
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
@limiter.limit("6/minute;10/day", key_func=lambda:request.values.get("username").lower(), deduct_when=login_deduct_when)
@limiter.limit("6/minute;10/day",
deduct_when=login_deduct_when)
def login_post():
template = ''
g.login_failed = True