aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-09-21 12:11:40 -0400
committer无闻 <joe2010xtmf@163.com>2014-09-21 12:11:40 -0400
commitd325b23dbb44fe3b1e542ee330185610e861279e (patch)
treecef9d08801579d72dfb5c42e8bf8019f23f9dff6 /cmd
parentcb0ea46d1e06ec64358807d4e0fc49d9ecece311 (diff)
parent976f1486e01548bfb420a7c809ede6fc273e4a26 (diff)
downloadgitea-d325b23dbb44fe3b1e542ee330185610e861279e.tar.gz
gitea-d325b23dbb44fe3b1e542ee330185610e861279e.zip
Merge pull request #492 from chadoe/suburlcookie
Set cookiepath to AppSubUrl
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 45f35a35af..83dfca4e67 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -97,9 +97,10 @@ func newMacaron() *macaron.Macaron {
Config: *setting.SessionConfig,
}))
m.Use(csrf.Generate(csrf.Options{
- Secret: setting.SecretKey,
- SetCookie: true,
- Header: "X-Csrf-Token",
+ Secret: setting.SecretKey,
+ SetCookie: true,
+ Header: "X-Csrf-Token",
+ CookiePath: setting.AppSubUrl,
}))
m.Use(toolbox.Toolboxer(m, toolbox.Options{
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{