v0.0.2
RustBox CI / rustbox (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-29 20:04:58 +01:00
1 parent 31634543f0
commit a238ff5e23
2 files changed
+22 -16

No files matched your search

+9 -1
View File
@@ -502,7 +502,15 @@ pub fn create_router(
// Use the same base path for routing and authentication cookies.
let router = match config.normalized_base_path() {
"/" => inner,
base_path => Router::new().nest(base_path, inner),
base_path => {
// Axum nests an inner `/` route at the prefix itself (`/mail`),
// not at the trailing-slash variant (`/mail/`). Serve that variant
// explicitly so both URLs load the same embedded SPA.
let base_path_slash = format!("{}/", base_path.trim_end_matches('/'));
Router::new()
.route(&base_path_slash, get(crate::ui::serve_ui))
.nest(base_path, inner)
}
};
let router = router