1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

add middleware finished handler for route middleware

This commit is contained in:
Nikolay Kim
2018-04-29 20:50:38 -07:00
parent 91235ac816
commit ab4e889f96
3 changed files with 90 additions and 16 deletions

View File

@@ -169,7 +169,7 @@ impl<S: 'static> Scope<S> {
/// This is similar to `App's` middlewares, but
/// middlewares get invoked on scope level.
///
/// *Note* `Middleware::finish()` is fired right after response get
/// *Note* `Middleware::finish()` fires right after response get
/// prepared. It does not wait until body get sent to peer.
pub fn middleware<M: Middleware<S>>(mut self, mw: M) -> Scope<S> {
Rc::get_mut(&mut self.middlewares)