Skip to content

Commit 9ac9a51

Browse files
committed
use .nest_service instead of .nest
1 parent 1b363c0 commit 9ac9a51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/web/routes.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub(super) fn build_axum_routes() -> AxumRouter {
114114
//
115115
// This panics because of conflicting routes:
116116
// - `/{name}/{version}/settings.html`
117-
// - `/:crate/{version}/{target}`
117+
// - `/{crate}/{version}/{target}`
118118
//
119119
AxumRouter::new()
120120
// Well known resources, robots.txt and favicon.ico support redirection, the sitemap.xml
@@ -129,7 +129,9 @@ pub(super) fn build_axum_routes() -> AxumRouter {
129129
"/favicon.ico",
130130
get_static(|| async { Redirect::permanent("/-/static/favicon.ico") }),
131131
)
132-
.nest("/-/static", build_static_router())
132+
// `.nest` with fallbacks is currently broken, `.nest_service works
133+
// https://github.com/tokio-rs/axum/issues/3138
134+
.nest_service("/-/static", build_static_router())
133135
.route(
134136
"/opensearch.xml",
135137
get_static(|| async { Redirect::permanent("/-/static/opensearch.xml") }),

0 commit comments

Comments
 (0)