From fe646f437242dc1593e998846a2f3241dec3b72a Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 1 Jul 2024 21:18:25 +0900 Subject: [PATCH] WIP --- fishctl/src/command/config/update/v1.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fishctl/src/command/config/update/v1.rs b/fishctl/src/command/config/update/v1.rs index 94f0713..f9e8071 100644 --- a/fishctl/src/command/config/update/v1.rs +++ b/fishctl/src/command/config/update/v1.rs @@ -628,15 +628,13 @@ fn create_new_server_config( }), }; - let mut security: Option = None; - - if meta.secure_mode + let security = if meta.secure_mode || meta.private_mode || captcha.is_some() || meta.enable_active_email_validation || meta.enable_ip_logging { - security = Some(server::Security { + Some(server::Security { require_authorized_fetch: match meta.secure_mode { false => None, true => Some(true), @@ -654,8 +652,10 @@ fn create_new_server_config( false => None, true => Some(true), }, - }); - } + }) + } else { + None + }; let server_config = server::Config { config_revision: Revision::V1,