forked from rDrama/rDrama
1
0
Fork 0

reduce post ratelimit on wpd from 30/day to 20/day

master
Aevann 2023-08-17 05:42:16 +03:00
parent 57eb1e877a
commit 5b3a0a6073
2 changed files with 2 additions and 5 deletions

View File

@ -48,7 +48,6 @@ class Service(Enum):
RDRAMA = auto()
CHAT = auto()
POST_RATELIMIT = '20/day'
DEFAULT_RATELIMIT = "30/minute;200/hour;1000/day"
CASINO_RATELIMIT = "100/minute;2000/hour;12000/day"
@ -768,8 +767,6 @@ if SITE == 'rdrama.net':
'justcool393': JUSTCOOL_ID
}
elif SITE == 'watchpeopledie.tv':
POST_RATELIMIT = '30/day'
NOTIFICATION_SPAM_AGE_THRESHOLD = 0.5 * 86400
EMAIL = "wpd@watchpeopledie.tv"

View File

@ -412,8 +412,8 @@ def is_repost(v):
@app.post("/h/<sub>/submit")
@limiter.limit('1/second', scope=rpath)
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
@limiter.limit(POST_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
@limiter.limit(POST_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@limiter.limit('20/day', deduct_when=lambda response: response.status_code < 400)
@limiter.limit('20/day', deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
@is_not_banned
def submit_post(v, sub=None):
url = request.values.get("url", "").strip()