[MM-45817] Set cloud cookies whenever user gets logged in (#20692)

Этот коммит содержится в:
Julien Tant
2022-07-26 07:47:09 -07:00
коммит произвёл GitHub
родитель 20cb042362
Коммит 1044fba449
3 изменённых файлов: 58 добавлений и 10 удалений

Просмотреть файл

@@ -331,6 +331,11 @@ func (a *App) AttachSessionCookies(c *request.Context, w http.ResponseWriter, r
http.SetCookie(w, sessionCookie)
http.SetCookie(w, userCookie)
http.SetCookie(w, csrfCookie)
// For context see: https://mattermost.atlassian.net/browse/MM-39583
if a.Channels().License() != nil && *a.Channels().License().Features.Cloud {
a.AttachCloudSessionCookie(c, w, r)
}
}
func GetProtocol(r *http.Request) string {