mirror of
https://github.com/labstack/echo.git
synced 2025-07-01 00:55:04 +02:00
4
echo.go
4
echo.go
@ -478,11 +478,11 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
c.Reset(r, w)
|
c.Reset(r, w)
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
h := func(Context) error {
|
h := func(c Context) error {
|
||||||
method := r.Method
|
method := r.Method
|
||||||
path := r.URL.Path
|
path := r.URL.Path
|
||||||
e.router.Find(method, path, c)
|
e.router.Find(method, path, c)
|
||||||
h := c.handler
|
h := c.Handler()
|
||||||
for i := len(e.middleware) - 1; i >= 0; i-- {
|
for i := len(e.middleware) - 1; i >= 0; i-- {
|
||||||
h = e.middleware[i](h)
|
h = e.middleware[i](h)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user