aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-07-29 23:28:21 +0200
committerThomas Voss <mail@thomasvoss.com> 2025-07-29 23:28:21 +0200
commitb16624a431d917e943645fc6db7c342558544325 (patch)
tree26ef23bf423b3d01dbe8e95034588dbbb5d5dd48
parent089db1786d0b625aa5c5dd939c606b7c3537f888 (diff)
Expire the redirect cookie
-rw-r--r--src/http.go6
1 files 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),
})
}