diff --git a/src/config.rs b/src/config.rs index 884a30f..04a1427 100644 --- a/src/config.rs +++ b/src/config.rs @@ -171,7 +171,7 @@ impl Config { let local_domains = config .local_domains .iter() - .flat_map(|s| s.split(",")) + .flat_map(|s| s.split(',')) .map(|d| d.to_string()) .collect(); diff --git a/src/routes/index.rs b/src/routes/index.rs index f243d8b..048eb05 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -33,8 +33,7 @@ pub(crate) async fn route( config .local_domains() .iter() - .find(|domain| domain.as_str() == authority) - .is_some() + .any(|domain| domain.as_str() == authority) }) .unwrap_or(false) {