Browse Source

redirect "permission denied" requests to "/" (#10773)

Alexander Zobnin 7 years ago
parent
commit
f97be541af
1 changed files with 1 additions and 2 deletions
  1. 1 2
      pkg/middleware/auth.go

+ 1 - 2
pkg/middleware/auth.go

@@ -42,8 +42,7 @@ func accessForbidden(c *Context) {
 		return
 	}
 
-	c.SetCookie("redirect_to", url.QueryEscape(setting.AppSubUrl+c.Req.RequestURI), 0, setting.AppSubUrl+"/")
-	c.Redirect(setting.AppSubUrl + "/login")
+	c.Redirect(setting.AppSubUrl + "/")
 }
 
 func notAuthorized(c *Context) {