mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Add ExpiresAt to session cookie so that IE/Edge store the cookie
This commit is contained in:
@@ -31,6 +31,7 @@ import (
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func InitUser(r *mux.Router) {
|
||||
@@ -633,12 +634,14 @@ func Login(c *Context, w http.ResponseWriter, r *http.Request, user *model.User,
|
||||
}
|
||||
|
||||
multiToken = strings.TrimSpace(multiToken + " " + session.Token)
|
||||
expiresAt := time.Unix(model.GetMillis()/1000+int64(maxAge), 0)
|
||||
|
||||
multiSessionCookie := &http.Cookie{
|
||||
Name: model.SESSION_COOKIE_TOKEN,
|
||||
Value: multiToken,
|
||||
Path: "/",
|
||||
MaxAge: maxAge,
|
||||
Expires: expiresAt,
|
||||
HttpOnly: true,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user