Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-26 05:50:29 +01:00
Error when admin panel is disabled
Dieser Commit ist enthalten in:
Ursprung
330e90a6ac
Commit
f3b1a5ff3e
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
|
@ -16,7 +16,7 @@ use crate::CONFIG;
|
||||||
|
|
||||||
pub fn routes() -> Vec<Route> {
|
pub fn routes() -> Vec<Route> {
|
||||||
if CONFIG.admin_token().is_none() {
|
if CONFIG.admin_token().is_none() {
|
||||||
return Vec::new();
|
return routes![admin_disabled];
|
||||||
}
|
}
|
||||||
|
|
||||||
routes![
|
routes![
|
||||||
|
@ -31,6 +31,11 @@ pub fn routes() -> Vec<Route> {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[get("/")]
|
||||||
|
fn admin_disabled() -> &'static str {
|
||||||
|
"The admin panel is disabled, please configure the 'ADMIN_TOKEN' variable to enable it"
|
||||||
|
}
|
||||||
|
|
||||||
const COOKIE_NAME: &str = "BWRS_ADMIN";
|
const COOKIE_NAME: &str = "BWRS_ADMIN";
|
||||||
const ADMIN_PATH: &str = "/admin";
|
const ADMIN_PATH: &str = "/admin";
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren