You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked for existing issues (including closed) about this
Bug Report
When using nest(some_path, sub_router);, it is impossible to distinguish the trailing / in path.
Version
0.8
Platform
All.
Crates
axum
Description
I tried this code:
let r1 = Router::new()
.route("", get(index_page)) // This line of code will cause a compilation error unless it is commented out.
.route("/", get(index_page))
.route("/add", get(add_page))
.route("/list", get(list_page));
Router::new().nest("/Mall", r1).fallback(get(not_found))
Simply put, I hope that when nesting sub-routes, it can correctly distinguish between two cases: http://127.0.0.1/Mall and http://127.0.0.1/Mall/. However, currently, the Axum framework can only recognize the case of http://127.0.0.1/Mall.
The text was updated successfully, but these errors were encountered:
Bug Report
When using
nest(some_path, sub_router);
, it is impossible to distinguish the trailing/
in path.Version
0.8
Platform
All.
Crates
axum
Description
I tried this code:
I expected to see this happen:
Instead, this happened:
Simply put, I hope that when nesting sub-routes, it can correctly distinguish between two cases:
http://127.0.0.1/Mall
andhttp://127.0.0.1/Mall/
. However, currently, theAxum
framework can only recognize the case ofhttp://127.0.0.1/Mall
.The text was updated successfully, but these errors were encountered: