diff options
author | Shay <hillerys@element.io> | 2024-06-05 05:43:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 13:43:36 +0100 |
commit | fcbc79bb87d08147e86dafa0fee5a9aec4d3fc23 (patch) | |
tree | 5d5efc029b3410f96ce9aa5dc49b55e7ef4755c5 /synapse/config | |
parent | Handle hyphens in user dir search porperly (#17254) (diff) | |
download | synapse-fcbc79bb87d08147e86dafa0fee5a9aec4d3fc23.tar.xz |
Ratelimiting of remote media downloads (#17256)
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/ratelimiting.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/config/ratelimiting.py b/synapse/config/ratelimiting.py index d2cb4576df..3fa33f5373 100644 --- a/synapse/config/ratelimiting.py +++ b/synapse/config/ratelimiting.py @@ -218,3 +218,13 @@ class RatelimitConfig(Config): "rc_media_create", defaults={"per_second": 10, "burst_count": 50}, ) + + self.remote_media_downloads = RatelimitSettings( + key="rc_remote_media_downloads", + per_second=self.parse_size( + config.get("remote_media_download_per_second", "87K") + ), + burst_count=self.parse_size( + config.get("remote_media_download_burst_count", "500M") + ), + ) |