mirror of https://github.com/jlelse/GoBlog
Set cookies for all pages
This commit is contained in:
parent
ea00ff5788
commit
eecc3a7d35
|
@ -37,6 +37,7 @@ func (a *goBlog) initSessions() {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
SameSite: http.SameSiteLaxMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
MaxAge: int((7 * 24 * time.Hour).Seconds()),
|
MaxAge: int((7 * 24 * time.Hour).Seconds()),
|
||||||
|
Path: "/", // Cookie for all pages
|
||||||
},
|
},
|
||||||
db: a.db,
|
db: a.db,
|
||||||
}
|
}
|
||||||
|
@ -47,6 +48,7 @@ func (a *goBlog) initSessions() {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
SameSite: http.SameSiteLaxMode,
|
SameSite: http.SameSiteLaxMode,
|
||||||
MaxAge: int((24 * time.Hour).Seconds()),
|
MaxAge: int((24 * time.Hour).Seconds()),
|
||||||
|
Path: "/", // Cookie for all pages
|
||||||
},
|
},
|
||||||
db: a.db,
|
db: a.db,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue