summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2023-08-10 15:50:16 +0000
committerTimo Kösters <timo@koesters.xyz>2023-08-10 15:50:16 +0000
commitb7b2eb9d0539016c4ea5f094e1d9ff9ea1bf7d09 (patch)
tree7413ac77dda2d106db8272cbb6498cad0a61421f
parent9db87550fdac5cb4b78deb9d2ddb6e6f191a1a46 (diff)
parent19bfee1835ba89246ec9e3e703ceb5c2f8dc6711 (diff)
downloadconduit-b7b2eb9d0539016c4ea5f094e1d9ff9ea1bf7d09.zip
Merge branch 'trust' into 'next'
improvement: matrix.org is default trusted server if unspecified See merge request famedly/conduit!536
-rw-r--r--src/config/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 9128c52..a4d7cca 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -65,7 +65,7 @@ pub struct Config {
#[serde(default)]
pub proxy: ProxyConfig,
pub jwt_secret: Option<String>,
- #[serde(default = "Vec::new")]
+ #[serde(default = "default_trusted_servers")]
pub trusted_servers: Vec<OwnedServerName>,
#[serde(default = "default_log")]
pub log: String,
@@ -259,6 +259,10 @@ fn default_max_fetch_prev_events() -> u16 {
100_u16
}
+fn default_trusted_servers() -> Vec<OwnedServerName> {
+ vec![OwnedServerName::try_from("matrix.org").unwrap()]
+}
+
fn default_log() -> String {
"warn,state_res=warn,_=off,sled=off".to_owned()
}