From 480ba933fa01f2fa09e515fe238784c4cd3c2576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Thu, 30 Jan 2020 22:10:50 +0100 Subject: [PATCH] Don't error if admin token is empty but disabled --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 93161e51..b26c6f57 100644 --- a/src/config.rs +++ b/src/config.rs @@ -405,7 +405,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { } if let Some(ref token) = cfg.admin_token { - if token.trim().is_empty() { + if token.trim().is_empty() && !cfg.disable_admin_token { err!("`ADMIN_TOKEN` is enabled but has an empty value. To enable the admin page without token, use `DISABLE_ADMIN_TOKEN`") } }