forked from MarseyWorld/MarseyWorld
increase /comments ratelimit
parent
30fdec3f5a
commit
b6c7d041b4
|
@ -280,8 +280,8 @@ def comment_idlist(v=None, page=1, sort="new", t="day", gt=0, lt=0):
|
|||
return [x.id for x in comments], total
|
||||
|
||||
@app.get("/comments")
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@limiter.limit("30/minute;400/hour;5000/day", deduct_when=lambda response: response.status_code < 400)
|
||||
@limiter.limit("30/minute;400/hour;5000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def all_comments(v):
|
||||
page = get_page()
|
||||
|
|
Loading…
Reference in New Issue