summaryrefslogtreecommitdiffstats
path: root/routers/common/middleware.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/common/middleware.go')
-rw-r--r--routers/common/middleware.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/common/middleware.go b/routers/common/middleware.go
index c1ee9dd765..a25ff1ee00 100644
--- a/routers/common/middleware.go
+++ b/routers/common/middleware.go
@@ -42,7 +42,7 @@ func ProtocolMiddlewares() (handlers []any) {
return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
ctx, _, finished := process.GetManager().AddTypedContext(req.Context(), fmt.Sprintf("%s: %s", req.Method, req.RequestURI), process.RequestProcessType, true)
defer finished()
- next.ServeHTTP(context.NewResponse(resp), req.WithContext(cache.WithCacheContext(ctx)))
+ next.ServeHTTP(context.WrapResponseWriter(resp), req.WithContext(cache.WithCacheContext(ctx)))
})
})