Skip to content

Commit

Permalink
proxy middleware: reuse echo request context
Browse files Browse the repository at this point in the history
  • Loading branch information
x1h0 committed Oct 27, 2023
1 parent 69a0de8 commit 6c6bccb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions middleware/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
c.Set("_error", nil)
}

// Reuse context from echo request
// This is needed to access context values in modifyResponse.
req = req.WithContext(c.Request().Context())

// Proxy
switch {
case c.IsWebSocket():
Expand Down

0 comments on commit 6c6bccb

Please sign in to comment.