support blocking servers from fetching remote media from
akin to synapse's `prevent_media_downloads_from` Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
1a06c8c9d3
commit
6ffc54e241
4 changed files with 39 additions and 1 deletions
|
@ -128,6 +128,9 @@ pub struct Config {
|
|||
#[serde(default)]
|
||||
pub allow_guest_registration: bool,
|
||||
|
||||
#[serde(default = "Vec::new")]
|
||||
pub prevent_media_downloads_from: Vec<OwnedServerName>,
|
||||
|
||||
#[serde(flatten)]
|
||||
pub catchall: BTreeMap<String, IgnoredAny>,
|
||||
}
|
||||
|
@ -305,6 +308,13 @@ impl fmt::Display for Config {
|
|||
"RocksDB database optimize for spinning disks",
|
||||
&self.rocksdb_optimize_for_spinning_disks.to_string(),
|
||||
),
|
||||
("Prevent Media Downloads From", {
|
||||
let mut lst = vec![];
|
||||
for domain in &self.prevent_media_downloads_from {
|
||||
lst.push(domain.host());
|
||||
}
|
||||
&lst.join(", ")
|
||||
}),
|
||||
];
|
||||
|
||||
let mut msg: String = "Active config values:\n\n".to_owned();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue