From d2218cca37b2da23d02d5856eda93fdf8b20568f Mon Sep 17 00:00:00 2001 From: matst80 Date: Wed, 14 May 2025 14:12:19 +0200 Subject: [PATCH] update cookies --- main.go | 2 ++ pool-server.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/main.go b/main.go index adf9176..c8f6d61 100644 --- a/main.go +++ b/main.go @@ -264,6 +264,8 @@ func main() { Name: "cartid", Value: "", Path: "/", + Secure: true, + HttpOnly: true, Expires: time.Unix(0, 0), SameSite: http.SameSiteLaxMode, }) diff --git a/pool-server.go b/pool-server.go index cda128a..4f68ae2 100644 --- a/pool-server.go +++ b/pool-server.go @@ -274,6 +274,7 @@ func CookieCartIdHandler(fn func(w http.ResponseWriter, r *http.Request, cartId http.SetCookie(w, &http.Cookie{ Name: "cartid", Value: cartId.String(), + Secure: true, HttpOnly: true, Path: "/", Expires: time.Now().AddDate(0, 0, 14), @@ -292,6 +293,8 @@ func (s *PoolServer) RemoveCartCookie(w http.ResponseWriter, r *http.Request, ca Name: "cartid", Value: cartId.String(), Path: "/", + Secure: true, + HttpOnly: true, Expires: time.Unix(0, 0), SameSite: http.SameSiteLaxMode, })