aboutsummaryrefslogtreecommitdiffstats
path: root/routers/common/middleware.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/common/middleware.go')
-rw-r--r--routers/common/middleware.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/common/middleware.go b/routers/common/middleware.go
index 0c7838b0ef..d664bfccfa 100644
--- a/routers/common/middleware.go
+++ b/routers/common/middleware.go
@@ -8,6 +8,7 @@ import (
"net/http"
"strings"
+ "code.gitea.io/gitea/modules/cache"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/process"
@@ -28,7 +29,7 @@ func Middlewares() []func(http.Handler) http.Handler {
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(ctx))
+ next.ServeHTTP(context.NewResponse(resp), req.WithContext(cache.WithCacheContext(ctx)))
})
},
}