index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
modules
/
middleware
/
auth.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
(limited to 'modules/middleware/auth.go')
-rw-r--r--
modules/middleware/auth.go
2
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
}