aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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),
})
}