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/rest/client | |
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/rest/client')
-rw-r--r-- | synapse/rest/client/media.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/rest/client/media.py b/synapse/rest/client/media.py index 172d240783..0c089163c1 100644 --- a/synapse/rest/client/media.py +++ b/synapse/rest/client/media.py @@ -174,6 +174,7 @@ class UnstableThumbnailResource(RestServlet): respond_404(request) return + ip_address = request.getClientAddress().host remote_resp_function = ( self.thumbnailer.select_or_generate_remote_thumbnail if self.dynamic_thumbnails @@ -188,6 +189,7 @@ class UnstableThumbnailResource(RestServlet): method, m_type, max_timeout_ms, + ip_address, ) self.media_repo.mark_recently_accessed(server_name, media_id) |