fix: proper error message when web ui not enabled
parent
5b96a9409c
commit
f2a764d84e
|
@ -432,11 +432,14 @@ fn main() -> Result<()> {
|
|||
actix_files::Files::new("/", ui_path).index_file("index.html"),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// TODO - 503 error
|
||||
}
|
||||
|
||||
app
|
||||
#[actix_web::get("/")]
|
||||
async fn unavailable_index() -> actix_web::HttpResponse {
|
||||
actix_web::HttpResponse::ServiceUnavailable().body("Web UI not enabled.")
|
||||
}
|
||||
|
||||
return app.service(unavailable_index);
|
||||
});
|
||||
|
||||
let bind_result = server.bind(&bind);
|
||||
|
|
Loading…
Reference in New Issue