Redirect bare "/" to the /web UI

The root URI had no content of its own and only showed a pointer
message; send visitors straight to the front-end instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-06 16:11:38 -04:00
co-authored by Claude Opus 4.8
parent a51b9c06dc
commit cf7dd96415
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -168,10 +168,8 @@ pub async fn serve() -> Result<(), Box<dyn Error>> {
)
.route_layer(axum::middleware::from_fn(auth))
.layer(ServiceBuilder::new().layer(cors_layer))
.route(
"/",
get(|| async { "Go to /web for the UI or to /api/docs for the API explorer." }),
)
// Send visitors straight to the UI; the bare "/" has no content of its own.
.route("/", get(|| async { Redirect::temporary("/web") }))
// The API explorer lives at /api/docs; redirect the bare /api for convenience.
.route("/api", get(|| async { Redirect::temporary("/api/docs") }))
.nest_service("/web", static_files)