Set SameSite to strict on the session cookie
This commit is contained in:
parent
b89616a904
commit
138eb64e52
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Reference in a new issue