add better rate limits
Build and Push Docker Container / build-and-push (push) Successful in 1m48s

This commit is contained in:
2025-10-24 21:59:02 +02:00
parent 6f85ee1856
commit 180fd1c071
2 changed files with 7 additions and 5 deletions
+5
View File
@@ -6,6 +6,11 @@ from my_modules.functions import get_ip, enforce_custom_limit
@app.errorhandler(401)
async def handle_unauthorized(e):
try:
enforce_custom_limit(LIMITER, "401", limit_count=5, window_sec=1800)
except LookupError as e:
return await to_many_requests(e)
await logger.error(e)
return redirect(url_for('auth_login.login'))