Merge pull request #152 from izderadicka/fix-web-route

Add redirect for /web
This commit is contained in:
Igor Katson 2024-07-20 12:11:21 +01:00 committed by GitHub
commit 40aa663101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
use anyhow::Context;
use axum::body::Bytes;
use axum::extract::{Path, Query, State};
use axum::response::IntoResponse;
use axum::response::{IntoResponse, Redirect};
use axum::routing::{get, post};
use futures::future::BoxFuture;
use futures::{FutureExt, TryStreamExt};
@ -341,6 +341,7 @@ impl HttpApi {
);
app = app.nest("/web/", webui_router);
app = app.route("/web", get(|| async { Redirect::permanent("/web/") }))
}
let cors_layer = {