mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Allow Routers to inherit state (#1368)
* Rename Fallback::Custom to Fallback::Service
* Allow Routers to inherit state
* Rename Router::{nest => nest_service} and add new nest method for Routers
* Fix lints
* Add basic tests for state inheritance
* Changelog
This commit is contained in:
@@ -131,7 +131,7 @@ where
|
||||
// to prevent directory traversal attacks we ensure the path consists of exactly one normal
|
||||
// component
|
||||
fn path_is_valid(path: &str) -> bool {
|
||||
let path = std::path::Path::new(&*path);
|
||||
let path = std::path::Path::new(path);
|
||||
let mut components = path.components().peekable();
|
||||
|
||||
if let Some(first) = components.peek() {
|
||||
|
||||
Reference in New Issue
Block a user