From b16624a431d917e943645fc6db7c342558544325 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 29 Jul 2025 23:28:21 +0200 Subject: Expire the redirect cookie --- src/http.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/http.go b/src/http.go index db1316f..b770a43 100644 --- a/src/http.go +++ b/src/http.go @@ -10,6 +10,7 @@ import ( "net/http" "slices" "strconv" + "time" . "git.thomasvoss.com/euro-cash.eu/pkg/try" @@ -88,8 +89,9 @@ func finalHandler(w http.ResponseWriter, r *http.Request) { original page they came from. */ if path == "/language" { http.SetCookie(w, &http.Cookie{ - Name: "redirect", - Value: cmp.Or(r.Referer(), "/"), + Name: "redirect", + Value: cmp.Or(r.Referer(), "/"), + Expires: time.Now().Add(24 * time.Hour), }) } -- cgit v1.2.3