From 7937888902415a8a14754f10830cb5908bf35439 Mon Sep 17 00:00:00 2001 From: Arunabha-Mukhopadhyay Date: Wed, 29 Jul 2026 02:17:41 +0530 Subject: [PATCH] Return 503 instead of 200 when admin panel is disabled Fixes #7493 --- src/api/admin.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/api/admin.rs b/src/api/admin.rs index 7037bfb1..2ac5adf8 100644 --- a/src/api/admin.rs +++ b/src/api/admin.rs @@ -98,8 +98,11 @@ static CAN_BACKUP: LazyLock = LazyLock::new(|| ACTIVE_DB_TYPE.get().is_som static CAN_BACKUP: LazyLock = LazyLock::new(|| false); #[get("/")] -fn admin_disabled() -> &'static str { - "The admin panel is disabled, please configure the 'ADMIN_TOKEN' variable to enable it" +fn admin_disabled() -> (Status, &'static str) { + ( + Status::ServiceUnavailable, + "The admin panel is disabled, please configure the 'ADMIN_TOKEN' variable to enable it", + ) } const COOKIE_NAME: &str = "VW_ADMIN";