forked from MarseyWorld/MarseyWorld
add another ratelimit by username
parent
e1dc790165
commit
4385bafa85
|
@ -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", deduct_when=login_deduct_when)
|
||||
@limiter.limit("6/minute;10/day", key_func=lambda:request.values.get("username").lower(), deduct_when=login_deduct_when)
|
||||
def login_post():
|
||||
template = ''
|
||||
g.login_failed = True
|
||||
|
|
Loading…
Reference in New Issue