mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
parent
17c8b8f2ea
commit
a5024b8038
1
echo.go
1
echo.go
@ -594,6 +594,7 @@ func WrapMiddleware(m func(http.Handler) http.Handler) MiddlewareFunc {
|
|||||||
return func(next HandlerFunc) HandlerFunc {
|
return func(next HandlerFunc) HandlerFunc {
|
||||||
return func(c Context) (err error) {
|
return func(c Context) (err error) {
|
||||||
m(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
m(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
c.SetRequest(r)
|
||||||
err = next(c)
|
err = next(c)
|
||||||
})).ServeHTTP(c.Response(), c.Request())
|
})).ServeHTTP(c.Response(), c.Request())
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user