From e467e6728099fabea99aaa6206f19d8b243093ae Mon Sep 17 00:00:00 2001 From: David Sferruzza Date: Thu, 4 Nov 2021 21:22:45 +0100 Subject: [PATCH] Add a note about middleware execution order (#240) --- content/docs/middleware.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/middleware.md b/content/docs/middleware.md index 0b657cb..a4b75c5 100644 --- a/content/docs/middleware.md +++ b/content/docs/middleware.md @@ -36,6 +36,8 @@ Alternatively, for simple use cases, you can use [*wrap_fn*][wrap_fn] to create > Actix-web provides several useful middleware, such as *logging*, *user sessions*, > *compress*, etc. +**Warning: if you use `wrap()` or `wrap_fn()` multiple times, the last occurrence will be executed first.** + # Logging Logging is implemented as a middleware. It is common to register a logging middleware