Skip to content

Commit fddc98b

Browse files
authored
Explain middleware Use() required ordering (#131)
This addition explains how `Echo#Use()` must be called in order for the middleware to be executed. Previous issues (labstack/echo#1304) have referenced this and the explanation has been to look at the unit tests. Having the behavior documented will help users understand how to correctly use this part of the library.
1 parent 68d1791 commit fddc98b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

website/content/middleware.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ every request or limiting the number of requests.
1717

1818
Handler is processed in the end after all middleware are finished executing.
1919

20+
Middleware registed using `Echo#Use()` is only executed for paths which are
21+
registered after `Echo#Use()` has been called.
22+
2023
## Levels
2124

2225
### Root Level (Before router)

0 commit comments

Comments
 (0)