handlers: set cookie with SameSiteStrictMode
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-04-19 03:34:23 +02:00
parent 33c9b8a30e
commit 6ba09987a9
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -371,8 +371,7 @@ func SigninPost(client *ent.Client) echo.HandlerFunc {
cookieSession := &http.Cookie{
Name: "session",
Value: username,
// SameSite: http.SameSiteStrictMode,
SameSite: http.SameSiteLaxMode,
SameSite: http.SameSiteStrictMode,
MaxAge: 3600,
Secure: secure,
HttpOnly: true,
@ -483,8 +482,7 @@ func SignupPost(client *ent.Client) echo.HandlerFunc {
cookieSession := &http.Cookie{
Name: "session",
Value: username,
// SameSite: http.SameSiteStrictMode,
SameSite: http.SameSiteLaxMode,
SameSite: http.SameSiteStrictMode,
MaxAge: 3600,
Secure: secure,
HttpOnly: true,
@ -594,8 +592,7 @@ func Logout() echo.HandlerFunc {
cookieSession := &http.Cookie{
Name: "session",
Value: "",
// SameSite: http.SameSiteStrictMode,
SameSite: http.SameSiteLaxMode,
SameSite: http.SameSiteStrictMode,
MaxAge: -1,
Secure: secure,
HttpOnly: true,