Set SameSite to strict on the session cookie

This commit is contained in:
Las Zenow 2020-12-03 16:26:30 +00:00
parent b89616a904
commit 138eb64e52

View file

@ -10,7 +10,12 @@ import (
"gitlab.com/trantor/trantor/lib/database" "gitlab.com/trantor/trantor/lib/database"
) )
var sesStore = sessions.NewCookieStore([]byte(os.Getenv("SESSION_KEY"))) var sesStore *sessions.CookieStore
func init() {
sesStore = sessions.NewCookieStore([]byte(os.Getenv("SESSION_KEY")))
sesStore.Options.SameSite = http.SameSiteStrictMode
}
type Notification struct { type Notification struct {
Title string Title string