aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-24 21:27:28 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-24 21:27:28 +0800
commit98ec6a4eaa274fac196e6e5273517db3fcf45e84 (patch)
tree2e4f0b1dbcf0cb097ac749ee72db18bd0d550fc6 /modules
parent5e22f1437ac2466d599c242fd5e256180fa7b68e (diff)
parentae92f92dee9007d1bef2db19331d9ee8f9883778 (diff)
Merge branch 'master' of https://github.com/gogits/gogs
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index 82c3367c..64f75d75 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -21,7 +21,7 @@ type ToggleOptions struct {
func Toggle(options *ToggleOptions) martini.Handler {
return func(ctx *Context) {
- if options.SignOutRequire && ctx.IsSigned {
+ if options.SignOutRequire && ctx.IsSigned && ctx.Req.RequestURI != "/" {
ctx.Redirect("/")
return
}