diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-10 14:37:51 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-10 14:37:51 -0400 |
commit | 29e255422e706b24e4ba8f4e1830a46da66d5269 (patch) | |
tree | 7fe329d1b5feaba764c46bdcb6ec4424b595c2d3 /web.go | |
parent | af552596cfd7f6fd05dfc38abaaffad1d7fed654 (diff) | |
parent | a24c0b92e4ad847fbd774e604e80017368f25495 (diff) | |
download | gitea-29e255422e706b24e4ba8f4e1830a46da66d5269.tar.gz gitea-29e255422e706b24e4ba8f4e1830a46da66d5269.zip |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -11,10 +11,10 @@ import ( "github.com/codegangsta/cli" "github.com/go-martini/martini" + qlog "github.com/qiniu/log" "github.com/gogits/binding" - "github.com/gogits/gogs/modules/auth" "github.com/gogits/gogs/modules/avatar" "github.com/gogits/gogs/modules/base" @@ -72,6 +72,11 @@ func runWeb(*cli.Context) { reqSignIn := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: true}) ignSignIn := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: base.Service.RequireSignInView}) + ignSignInAndCsrf := middleware.Toggle(&middleware.ToggleOptions{ + SignInRequire: base.Service.RequireSignInView, + DisableCsrf: true, + }) + reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true}) bindIgnErr := binding.BindIgnErr @@ -169,7 +174,7 @@ func runWeb(*cli.Context) { m.Group("/:username", func(r martini.Router) { r.Any("/:reponame/**", repo.Http) r.Get("/:reponame", middleware.RepoAssignment(true, true, true), repo.Single) - }, ignSignIn) + }, ignSignInAndCsrf) // Not found handler. m.NotFound(routers.NotFound) |