update cookies
Some checks failed
Build and Publish / BuildAndDeploy (push) Successful in 3m12s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
matst80
2025-05-14 14:12:19 +02:00
parent 81898648f5
commit d2218cca37
2 changed files with 5 additions and 0 deletions

View File

@@ -264,6 +264,8 @@ func main() {
Name: "cartid", Name: "cartid",
Value: "", Value: "",
Path: "/", Path: "/",
Secure: true,
HttpOnly: true,
Expires: time.Unix(0, 0), Expires: time.Unix(0, 0),
SameSite: http.SameSiteLaxMode, SameSite: http.SameSiteLaxMode,
}) })

View File

@@ -274,6 +274,7 @@ func CookieCartIdHandler(fn func(w http.ResponseWriter, r *http.Request, cartId
http.SetCookie(w, &http.Cookie{ http.SetCookie(w, &http.Cookie{
Name: "cartid", Name: "cartid",
Value: cartId.String(), Value: cartId.String(),
Secure: true,
HttpOnly: true, HttpOnly: true,
Path: "/", Path: "/",
Expires: time.Now().AddDate(0, 0, 14), Expires: time.Now().AddDate(0, 0, 14),
@@ -292,6 +293,8 @@ func (s *PoolServer) RemoveCartCookie(w http.ResponseWriter, r *http.Request, ca
Name: "cartid", Name: "cartid",
Value: cartId.String(), Value: cartId.String(),
Path: "/", Path: "/",
Secure: true,
HttpOnly: true,
Expires: time.Unix(0, 0), Expires: time.Unix(0, 0),
SameSite: http.SameSiteLaxMode, SameSite: http.SameSiteLaxMode,
}) })