diff options
author | Felix Ableitner <me@nutomic.com> | 2020-06-16 12:49:51 +0200 |
---|---|---|
committer | Felix Ableitner <me@nutomic.com> | 2020-06-16 12:49:51 +0200 |
commit | 325ed2ec3b2c6266de7af32a6d1fec74808f1cb7 (patch) | |
tree | 1e5cc6d6eac3f550286815bb6154282b8fceabad /server/src/apub/mod.rs | |
parent | cfa40e482abf588d2a397365cef07388266795fb (diff) |
Rename "instance_whitelist" config option to "allowed_instances"
Diffstat (limited to 'server/src/apub/mod.rs')
-rw-r--r-- | server/src/apub/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/apub/mod.rs b/server/src/apub/mod.rs index 93f50754..6a2d6cff 100644 --- a/server/src/apub/mod.rs +++ b/server/src/apub/mod.rs @@ -99,20 +99,20 @@ pub fn get_apub_protocol_string() -> &'static str { } } -// Checks if the ID has a valid format, correct scheme, and is in the whitelist. +// Checks if the ID has a valid format, correct scheme, and is in the allowed instance list. fn is_apub_id_valid(apub_id: &Url) -> bool { if apub_id.scheme() != get_apub_protocol_string() { return false; } - let whitelist: Vec<String> = Settings::get() + let allowed_instances: Vec<String> = Settings::get() .federation - .instance_whitelist + .allowed_instances .split(',') .map(|d| d.to_string()) .collect(); match apub_id.domain() { - Some(d) => whitelist.contains(&d.to_owned()), + Some(d) => allowed_instances.contains(&d.to_owned()), None => false, } } |