increase /comments ratelimit

master
Aevann 2024-09-08 22:15:24 +03:00
parent 30fdec3f5a
commit b6c7d041b4
1 changed files with 2 additions and 2 deletions

View File

@ -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()