diff options
-rw-r--r-- | routers/web/auth/auth.go | 2 | ||||
-rw-r--r-- | templates/base/head_navbar.tmpl | 4 | ||||
-rw-r--r-- | tests/integration/signout_test.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/auth/auth.go b/routers/web/auth/auth.go index e0883a2696..bc8f6d58c9 100644 --- a/routers/web/auth/auth.go +++ b/routers/web/auth/auth.go @@ -383,7 +383,7 @@ func SignOut(ctx *context.Context) { }) } HandleSignOut(ctx) - ctx.Redirect(setting.AppSubURL + "/") + ctx.JSONRedirect(setting.AppSubURL + "/") } // SignUp render the register page diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index a2be0187d9..3898c98ac9 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -68,7 +68,7 @@ </div> <div class="divider"></div> - <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/"> + <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout"> {{svg "octicon-sign-out"}} {{.locale.Tr "sign_out"}} </a> @@ -186,7 +186,7 @@ {{end}} <div class="divider"></div> - <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/"> + <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout"> {{svg "octicon-sign-out"}} {{.locale.Tr "sign_out"}} </a> diff --git a/tests/integration/signout_test.go b/tests/integration/signout_test.go index 0e822ac04e..7fd0b5c64a 100644 --- a/tests/integration/signout_test.go +++ b/tests/integration/signout_test.go @@ -16,7 +16,7 @@ func TestSignOut(t *testing.T) { session := loginUser(t, "user2") req := NewRequest(t, "POST", "/user/logout") - session.MakeRequest(t, req, http.StatusSeeOther) + session.MakeRequest(t, req, http.StatusOK) // try to view a private repo, should fail req = NewRequest(t, "GET", "/user2/repo2") |