mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-25 19:17:19 +08:00
Fix #543
This commit is contained in:
@ -29,6 +29,12 @@ func Toggle(options *ToggleOptions) macaron.Handler {
|
||||
return
|
||||
}
|
||||
|
||||
// Checking non-logged users landing page.
|
||||
if !ctx.IsSigned && ctx.Req.RequestURI == "/" && setting.LandingPageUrl != setting.LANDING_PAGE_HOME {
|
||||
ctx.Redirect(string(setting.LandingPageUrl))
|
||||
return
|
||||
}
|
||||
|
||||
// Redirect to dashboard if user tries to visit any non-login page.
|
||||
if options.SignOutRequire && ctx.IsSigned && ctx.Req.RequestURI != "/" {
|
||||
ctx.Redirect(setting.AppSubUrl + "/")
|
||||
|
Reference in New Issue
Block a user