summary refs log tree commit diff
path: root/docs/usage/configuration/config_documentation.md
diff options
context:
space:
mode:
authorTravis Ralston <travisr@matrix.org>2023-05-09 12:08:51 -0600
committerGitHub <noreply@github.com>2023-05-09 14:08:51 -0400
commitab4535b6082db97e8c48a69ea6674fe3b7c5e956 (patch)
tree68c545c1409c39ba43070ab21b2315e45d1415ea /docs/usage/configuration/config_documentation.md
parentMerge branch 'master' into develop (diff)
downloadsynapse-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 'docs/usage/configuration/config_documentation.md')
-rw-r--r--docs/usage/configuration/config_documentation.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/usage/configuration/config_documentation.md b/docs/usage/configuration/config_documentation.md
index 14c21f73fe..6dd1a639ed 100644
--- a/docs/usage/configuration/config_documentation.md
+++ b/docs/usage/configuration/config_documentation.md
@@ -1768,6 +1768,30 @@ Example configuration:
 max_image_pixels: 35M
 ```
 ---
+### `prevent_media_downloads_from`
+
+A list of domains to never download media from. Media from these
+domains that is already downloaded will not be deleted, but will be
+inaccessible to users. This option does not affect admin APIs trying
+to download/operate on media.
+
+This will not prevent the listed domains from accessing media themselves.
+It simply prevents users on this server from downloading media originating
+from the listed servers.
+
+This will have no effect on media originating from the local server.
+This only affects media downloaded from other Matrix servers, to
+block domains from URL previews see [`url_preview_url_blacklist`](#url_preview_url_blacklist).
+
+Defaults to an empty list (nothing blocked).
+
+Example configuration:
+```yaml
+prevent_media_downloads_from:
+  - evil.example.org
+  - evil2.example.org
+```
+---
 ### `dynamic_thumbnails`
 
 Whether to generate new thumbnails on the fly to precisely match