Change nested routes to see the URI with prefix stripped (#197)

This commit is contained in:
David Pedersen
2021-08-18 09:48:36 +02:00
committed by GitHub
parent cb637f1124
commit e22045d42f
10 changed files with 255 additions and 55 deletions
+6
View File
@@ -304,6 +304,11 @@
//! # };
//! ```
//!
//! Note that nested routes will not see the orignal request URI but instead
//! have the matched prefix stripped. This is necessary for services like static
//! file serving to work. Use [`OriginalUri`] if you need the original request
//! URI.
//!
//! # Extractors
//!
//! An extractor is a type that implements [`FromRequest`]. Extractors is how
@@ -747,6 +752,7 @@
//! [examples]: https://github.com/tokio-rs/axum/tree/main/examples
//! [`RoutingDsl::or`]: crate::routing::RoutingDsl::or
//! [`axum::Server`]: hyper::server::Server
//! [`OriginalUri`]: crate::extract::OriginalUri
#![warn(
clippy::all,