Overlapping routes with nest("/", _)
#453
-
I wanna port an existing web app to axum, but having problems with overlapping routes. The problem is I wanna serve static files under
I can't use My questions are:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This exact use case was mentioned in the changelog actually:
So this should work |
Beta Was this translation helpful? Give feedback.
This exact use case was mentioned in the changelog actually:
So this should work
.fallback(static_file_svc).nest("/app", app::routes())
. The order doesn't matter. You might also wanna update tostatic_file_svc
to return some meaningful response for non-GET requests, probably 404.