mirror of https://github.com/fafhrd91/actix-web
docs: move documentation about order
This commit is contained in:
parent
e8c4b2e673
commit
39360492d9
|
@ -323,16 +323,7 @@ where
|
||||||
/// Middleware can be applied similarly to individual `Scope`s and `Resource`s.
|
/// Middleware can be applied similarly to individual `Scope`s and `Resource`s.
|
||||||
/// See [`Scope::wrap`](crate::Scope::wrap) and [`Resource::wrap`].
|
/// See [`Scope::wrap`](crate::Scope::wrap) and [`Resource::wrap`].
|
||||||
///
|
///
|
||||||
/// # Middleware Order
|
/// For more info on middleware take a look at the [`middleware` module][crate::middleware].
|
||||||
/// Notice that the keyword for registering middleware is `wrap`. As you register middleware
|
|
||||||
/// using `wrap` in the App builder, imagine wrapping layers around an inner App. The first
|
|
||||||
/// middleware layer exposed to a Request is the outermost layer (i.e., the *last* registered in
|
|
||||||
/// the builder chain). Consequently, the *first* middleware registered in the builder chain is
|
|
||||||
/// the *last* to start executing during request processing.
|
|
||||||
///
|
|
||||||
/// Ordering is less obvious when wrapped services also have middleware applied. In this case,
|
|
||||||
/// middlewares are run in reverse order for `App` _and then_ in reverse order for the
|
|
||||||
/// wrapped service.
|
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```
|
/// ```
|
||||||
|
|
Loading…
Reference in New Issue