From 1d83412545c7158d3f58f245839df5db5d8eab7b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 19 Sep 2022 21:35:58 +0200 Subject: [PATCH] test ratelimiting on devrama --- files/routes/posts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index 1ffa53943..e4caa5643 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -1160,7 +1160,7 @@ def toggle_post_nsfw(pid, v): else: return {"message": "Post has been unmarked as +18!"} @app.post("/save_post/") -@limiter.limit("1/second;30/minute;200/hour;1000/day") +@limiter.limit("1/day") @limiter.limit("1/second;30/minute;200/hour;1000/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}') @auth_required def save_post(pid, v): @@ -1177,7 +1177,7 @@ def save_post(pid, v): @app.post("/unsave_post/") @limiter.limit("1/second;30/minute;200/hour;1000/day") -@limiter.limit("1/second;30/minute;200/hour;1000/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}') +@limiter.limit("1/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}') @auth_required def unsave_post(pid, v):