diff options
author | David Robertson <davidr@element.io> | 2022-06-28 13:08:55 +0100 |
---|---|---|
committer | David Robertson <davidr@element.io> | 2022-07-04 19:10:13 +0100 |
commit | bd873e65718063b6c2099104ef46d7373c858693 (patch) | |
tree | 3bbe593876959b29b5e71dfcb835c065adf1b65f /synapse/config | |
parent | Remove unspecced DELETE endpoint that modifies room visibility (#13123) (diff) | |
download | synapse-bd873e65718063b6c2099104ef46d7373c858693.tar.xz |
Define config for room-level join limiter
but don't use it in tests
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/ratelimiting.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py index d4090a1f9a..f99e35cafa 100644 --- a/synapse/config/ratelimiting.py +++ b/synapse/config/ratelimiting.py @@ -112,6 +112,13 @@ class RatelimitConfig(Config): defaults={"per_second": 0.01, "burst_count": 10}, ) + # Track the rate of joins to a given room. If there are too many, temporarily + # prevent local joins and remote joins via this server. + self.rc_joins_per_room = RateLimitConfig( + config.get("rc_joins_per_room", {}), + defaults={"per_second": 1, "burst_count": 10}, + ) + # Ratelimit cross-user key requests: # * For local requests this is keyed by the sending device. # * For requests received over federation this is keyed by the origin. |