Add rate limit and don't use lock for vote

This commit is contained in:
cuom1999 2024-01-13 18:23:37 -06:00
parent 104cee9e81
commit 2cf386e8b5
5 changed files with 45 additions and 43 deletions

View file

@ -491,6 +491,11 @@ DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
# Chunk upload
CHUNK_UPLOAD_DIR = "/tmp/chunk_upload_tmp"
# Rate limit
RL_VOTE = "200/h"
RL_COMMENT = "30/h"
try:
with open(os.path.join(os.path.dirname(__file__), "local_settings.py")) as f:
exec(f.read(), globals())