Commit e3bd51e3 by Torkel Ödegaard

fix: remove duplicate set-cookie when logging in, fixes #9013

parent e8a20643
......@@ -137,6 +137,8 @@ func loginUserWithUser(user *m.User, c *middleware.Context) {
log.Error(3, "User login with nil user")
}
c.Resp.Header().Del("Set-Cookie")
days := 86400 * setting.LogInRememberDays
if days > 0 {
c.SetCookie(setting.CookieUserName, user.Login, days, setting.AppSubUrl+"/")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment