mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
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:
co-authored by
Claude Opus 4.8
parent
a51b9c06dc
commit
cf7dd96415
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user