From bde8d7cf40b72559d6026b4ef46bf557611b227b Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Tue, 14 Jan 2025 10:47:26 +0000 Subject: [PATCH] Web redirect is relative now --- crates/librqbit/src/http_api.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/librqbit/src/http_api.rs b/crates/librqbit/src/http_api.rs index 1951599..450aa1d 100644 --- a/crates/librqbit/src/http_api.rs +++ b/crates/librqbit/src/http_api.rs @@ -745,8 +745,7 @@ impl HttpApi { ) -> BoxFuture<'static, anyhow::Result<()>> { let state = Arc::new(self); - let mut main_router = Router::new(); - main_router = main_router.nest("/", make_api_router(state.clone())); + let mut main_router = make_api_router(state.clone()); #[cfg(feature = "webui")] { @@ -754,7 +753,7 @@ impl HttpApi { let webui_router = make_webui_router(); main_router = main_router.nest("/web/", webui_router); - main_router = main_router.route("/web", get(|| async { Redirect::permanent("/web/") })) + main_router = main_router.route("/web", get(|| async { Redirect::permanent("./web/") })) } let cors_layer = {