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
@@ -26,7 +26,7 @@
|
||||
|
||||
## Frontend
|
||||
|
||||
- [ ] When the user goes to the / URI in a production server redirect him to /web
|
||||
- [x] When the user goes to the / URI in a production server redirect him to /web
|
||||
- [ ] Add a link to the API docs (/api/docs) in the navigation (new window - only visible in wide)
|
||||
|
||||
## Improve engine
|
||||
|
||||
@@ -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