This commit is contained in:
ABUBAKAR R ABUBAKAR 2026-07-22 09:25:18 +00:00 committed by GitHub
commit abc770a2a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -30,6 +30,19 @@ type Guards = Vec<Box<dyn Guard>>;
/// requests using the [`Path`](crate::web::Path) extractor or /// requests using the [`Path`](crate::web::Path) extractor or
/// with [`HttpRequest::match_info()`](crate::HttpRequest::match_info). /// with [`HttpRequest::match_info()`](crate::HttpRequest::match_info).
/// ///
/// # Route Matching
///
/// Scopes are matched independently during routing. Once a request matches a
/// scope's path prefix, routing continues only within that scope. If no route
/// inside the matched scope can handle the request, Actix Web does not continue
/// searching sibling scopes or services.
///
/// Consequently, overlapping scopes do not behave the same as an equivalent
/// flat route structure.
///
/// If your goal is to organize routes into separate modules without changing
/// routing behavior, consider using `App::configure` or `Scope::configure`.
///
/// # Avoid Trailing Slashes /// # Avoid Trailing Slashes
/// Avoid using trailing slashes in the scope prefix (e.g., `web::scope("/scope/")`). It will almost /// Avoid using trailing slashes in the scope prefix (e.g., `web::scope("/scope/")`). It will almost
/// certainly not have the expected behavior. See the [documentation on resource definitions][pat] /// certainly not have the expected behavior. See the [documentation on resource definitions][pat]