mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Last middleware should use the request passed by preceding middleware. (#965)
This is useful when preceding middleware reads httpRequest.Body to perform some logic, and assigns a new ReadCloser to httpRequest.Body (as body can be read only once).
This commit is contained in:
committed by
Reed Allman
parent
1124c014ec
commit
e0b82519aa
@@ -93,7 +93,7 @@ func (s *Server) runMiddleware(c *gin.Context, ms []fnext.Middleware) {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
c.Request = c.Request.WithContext(ctx)
|
||||
c.Request = r.WithContext(ctx)
|
||||
c.Next()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user