From 5b6a4e1616ea6e387887222c7c627ef5fe6e774b Mon Sep 17 00:00:00 2001
From: lennart <lennart@lnrt.de>
Date: Sat, 11 Jan 2025 00:45:01 +0100
Subject: [PATCH] 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.
---
 aleph/settings.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/aleph/settings.py b/aleph/settings.py
index ac54403be..bacaef255 100644
--- a/aleph/settings.py
+++ b/aleph/settings.py
@@ -148,7 +148,9 @@ def __init__(self) -> None:
 
         # API rate limiting (req/min for anonymous users)
         self.API_RATE_LIMIT = env.to_int("ALEPH_API_RATE_LIMIT", 30)
-        self.API_RATE_WINDOW = 15  # minutes
+
+        # API rate window (in minutes)
+        self.API_RATE_WINDOW = env.to_int("ALEPH_API_RATE_WINDOW", 15)
 
         # Export file size limit
         self.EXPORT_MAX_SIZE = env.to_int(