loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use JSON response for "user/logout" (#25522)

The request sent to "user/logout" is from "link-action", it expects to
get JSON response.

authored by

wxiaoguang and committed by
GitHub
ddf96f68 da6df0d0

+4 -4
+1 -1
routers/web/auth/auth.go
··· 383 383 }) 384 384 } 385 385 HandleSignOut(ctx) 386 - ctx.Redirect(setting.AppSubURL + "/") 386 + ctx.JSONRedirect(setting.AppSubURL + "/") 387 387 } 388 388 389 389 // SignUp render the register page
+2 -2
templates/base/head_navbar.tmpl
··· 68 68 </div> 69 69 70 70 <div class="divider"></div> 71 - <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/"> 71 + <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout"> 72 72 {{svg "octicon-sign-out"}} 73 73 {{.locale.Tr "sign_out"}} 74 74 </a> ··· 186 186 {{end}} 187 187 188 188 <div class="divider"></div> 189 - <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/"> 189 + <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout"> 190 190 {{svg "octicon-sign-out"}} 191 191 {{.locale.Tr "sign_out"}} 192 192 </a>
+1 -1
tests/integration/signout_test.go
··· 16 16 session := loginUser(t, "user2") 17 17 18 18 req := NewRequest(t, "POST", "/user/logout") 19 - session.MakeRequest(t, req, http.StatusSeeOther) 19 + session.MakeRequest(t, req, http.StatusOK) 20 20 21 21 // try to view a private repo, should fail 22 22 req = NewRequest(t, "GET", "/user2/repo2")