Skip to content

Commit 6c6bccb

Browse files
committed
proxy middleware: reuse echo request context
1 parent 69a0de8 commit 6c6bccb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

middleware/proxy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
359359
c.Set("_error", nil)
360360
}
361361

362+
// Reuse context from echo request
363+
// This is needed to access context values in modifyResponse.
364+
req = req.WithContext(c.Request().Context())
365+
362366
// Proxy
363367
switch {
364368
case c.IsWebSocket():

0 commit comments

Comments
 (0)