aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-03-03 08:14:12 +0800
committerGitHub <noreply@github.com>2024-03-03 00:14:12 +0000
commit44398e405ffe297997c6b9c8dbb97f966926b65a (patch)
tree7a2fb5bb03bb66970b16c1656aa9141a2d407aae /routers
parentcc896258b9ea9f60c33077c937ce9b3951b58b35 (diff)
downloadgitea-44398e405ffe297997c6b9c8dbb97f966926b65a.tar.gz
gitea-44398e405ffe297997c6b9c8dbb97f966926b65a.zip
Fix incorrect cookie path for AppSubURL (#29534)
Regression of #24107
Diffstat (limited to 'routers')
-rw-r--r--routers/common/middleware.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/common/middleware.go b/routers/common/middleware.go
index 1ee4c629ad..c7c75fb099 100644
--- a/routers/common/middleware.go
+++ b/routers/common/middleware.go
@@ -38,6 +38,7 @@ func ProtocolMiddlewares() (handlers []any) {
})
})
+ // wrap the request and response, use the process context and add it to the process manager
handlers = append(handlers, func(next http.Handler) http.Handler {
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)