Skip to content

Commit 5b6a4e1

Browse files
committed
Source API_RATE_WINDOW from environment
The API_RATE_WINDOW variable was hardcoded to 15 minutes and not sourced from environment. This commit fixes this bug.
1 parent 7ba42d9 commit 5b6a4e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aleph/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ def __init__(self) -> None:
148148

149149
# API rate limiting (req/min for anonymous users)
150150
self.API_RATE_LIMIT = env.to_int("ALEPH_API_RATE_LIMIT", 30)
151-
self.API_RATE_WINDOW = 15 # minutes
151+
152+
# API rate window (in minutes)
153+
self.API_RATE_WINDOW = env.to_int("ALEPH_API_RATE_WINDOW", 15)
152154

153155
# Export file size limit
154156
self.EXPORT_MAX_SIZE = env.to_int(

0 commit comments

Comments
 (0)