Added ratelimiterbackends

This commit is contained in:
Ozzie Isaacs
2024-02-25 09:00:49 +01:00
parent 117c92233d
commit 3c4ed0de1a
7 changed files with 40 additions and 5 deletions
+3
View File
@@ -156,6 +156,9 @@ def requires_kobo_auth(f):
limiter.check()
except RateLimitExceeded:
return abort(429)
except (ConnectionError, Exception) as e:
log.error("Connection error to limiter backend: %s", e)
return abort(429)
user = (
ub.session.query(ub.User)
.join(ub.RemoteAuthToken)