200/h -> 400/h

master
Aevann 2024-07-10 10:36:21 +03:00
parent 9c3e871f61
commit a1a84eaef7
4 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ class Service(Enum):
RDRAMA = auto()
CHAT = auto()
DEFAULT_RATELIMIT = "30/minute;200/hour;1000/day"
DEFAULT_RATELIMIT = "30/minute;400/hour;1000/day"
CASINO_RATELIMIT = "100/minute;5000/hour;20000/day"
DELETE_RATELIMIT = "10/minute;50/day"

View File

@ -406,8 +406,8 @@ def submit_hat(v):
@feature_required('HAT_SUBMISSIONS')
@limiter.limit('1/second', scope=rpath)
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
@limiter.limit("120/minute;200/hour;1000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("120/minute;200/hour;1000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@limiter.limit("120/minute;400/hour;1000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("120/minute;400/hour;1000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@admin_level_required(PERMS['MODERATE_PENDING_SUBMITTED_ASSETS'])
def approve_hat(v, name):
comment = request.values.get("comment", "").strip()

View File

@ -121,8 +121,8 @@ def buy_awards(v, kind, AWARDS, quantity):
@app.post("/buy/<kind>")
@limiter.limit('1/second', scope=rpath) #Needed to fix race condition
@limiter.limit('1/second', scope=rpath, key_func=get_ID) #Needed to fix race condition
@limiter.limit("100/minute;200/hour;1000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("100/minute;200/hour;1000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@limiter.limit("100/minute;400/hour;1000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("100/minute;400/hour;1000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@auth_required
def buy(v, kind):
AWARDS = deepcopy(AWARDS_ENABLED(v))

View File

@ -97,8 +97,8 @@ def post_pid_comment_cid(cid, v, pid=None, anything=None, hole=None):
@app.post("/comment")
@limiter.limit('1/second', scope=rpath)
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
@limiter.limit("20/minute;200/hour;1000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("20/minute;200/hour;1000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@limiter.limit("20/minute;400/hour;1000/day", deduct_when=lambda response: response.status_code < 400)
@limiter.limit("20/minute;400/hour;1000/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@is_not_banned
def comment(v):
parent_fullname = request.values.get("parent_fullname").strip()