Rate limiting invites per issuer (#13125)

Co-authored-by: reivilibre <oliverw@matrix.org>
This commit is contained in:
David Teller 2022-06-30 11:44:47 +02:00 committed by GitHub
parent 4d3b8fb23f
commit 80c7a06777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 2 deletions

View file

@ -136,6 +136,11 @@ class RatelimitConfig(Config):
defaults={"per_second": 0.003, "burst_count": 5},
)
self.rc_invites_per_issuer = RateLimitConfig(
config.get("rc_invites", {}).get("per_issuer", {}),
defaults={"per_second": 0.3, "burst_count": 10},
)
self.rc_third_party_invite = RateLimitConfig(
config.get("rc_third_party_invite", {}),
defaults={