Set cookies for all pages

This commit is contained in:
Jan-Lukas Else 2021-07-14 11:54:20 +02:00
parent ea00ff5788
commit eecc3a7d35
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ func (a *goBlog) initSessions() {
HttpOnly: true,
SameSite: http.SameSiteLaxMode,
MaxAge: int((7 * 24 * time.Hour).Seconds()),
Path: "/", // Cookie for all pages
},
db: a.db,
}
@ -47,6 +48,7 @@ func (a *goBlog) initSessions() {
HttpOnly: true,
SameSite: http.SameSiteLaxMode,
MaxAge: int((24 * time.Hour).Seconds()),
Path: "/", // Cookie for all pages
},
db: a.db,
}