Properly wrap HTML for axum root handler
This commit is contained in:
parent
2297da8e73
commit
012771f2fb
|
@ -1,4 +1,5 @@
|
|||
use axum::extract::State;
|
||||
use axum::response::Html;
|
||||
use axum::{
|
||||
body::Full,
|
||||
http::{Response, StatusCode},
|
||||
|
@ -191,8 +192,8 @@ async fn metrics_handler(State(config): State<Config>) -> Result<impl IntoRespon
|
|||
}
|
||||
}
|
||||
|
||||
async fn homepage() -> &'static str {
|
||||
r#"<a href="/metrics">/metrics</a>"#
|
||||
async fn homepage() -> Html<&'static str> {
|
||||
Html(r#"<a href="/metrics">/metrics</a>"#)
|
||||
}
|
||||
|
||||
async fn metrics(config: Config) -> Result<Vec<u8>, WsError> {
|
||||
|
|
Loading…
Reference in a new issue