3
0
mirror of https://github.com/grafana/grafana.git synced 2025-01-28 09:17:12 -06:00

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

This commit is contained in:
Torkel Ödegaard 2017-08-21 11:10:59 +02:00
parent e8a20643d6
commit e3bd51e38d

View File

@ -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+"/")