Browse Source

Return 503 instead of 200 when admin panel is disabled Fixes #7493

pull/7504/head
Arunabha-Mukhopadhyay 2 months ago
parent
commit
7937888902
  1. 7
      src/api/admin.rs

7
src/api/admin.rs

@ -98,8 +98,11 @@ static CAN_BACKUP: LazyLock<bool> = LazyLock::new(|| ACTIVE_DB_TYPE.get().is_som
static CAN_BACKUP: LazyLock<bool> = 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";

Loading…
Cancel
Save