diff options
author | Travis Ralston <travisr@matrix.org> | 2023-05-09 12:08:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 14:08:51 -0400 |
commit | ab4535b6082db97e8c48a69ea6674fe3b7c5e956 (patch) | |
tree | 68c545c1409c39ba43070ab21b2315e45d1415ea /synapse/config | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-ab4535b6082db97e8c48a69ea6674fe3b7c5e956.tar.xz |
Add config option to prevent media downloads from listed domains. (#15197)
This stops media (and thumbnails) from being accessed from the listed domains. It does not delete any already locally cached media, but will prevent accessing it. Note that admin APIs are unaffected by this change.
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/repository.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/config/repository.py b/synapse/config/repository.py index ecb3edbe3a..655f06505b 100644 --- a/synapse/config/repository.py +++ b/synapse/config/repository.py @@ -137,6 +137,10 @@ class ContentRepositoryConfig(Config): self.max_image_pixels = self.parse_size(config.get("max_image_pixels", "32M")) self.max_spider_size = self.parse_size(config.get("max_spider_size", "10M")) + self.prevent_media_downloads_from = config.get( + "prevent_media_downloads_from", [] + ) + self.media_store_path = self.ensure_directory( config.get("media_store_path", "media_store") ) |