small pixel drawing of a pufferfish vore

use persistent cookie instead of session cookie, expire in 18y
Jes Olson j3s@c3f.net
Wed, 22 Mar 2023 13:40:36 -0700
commit

a3e64a8fc123d4afbe2677fd7c34804ecfdd90ad

parent

8ab8b23c344f9ab286a88809a5eb0c3ed713d54a

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M site.gosite.go

@@ -9,6 +9,7 @@ "net/url"

"path/filepath" "strings" "text/template" + "time" "git.j3s.sh/vore/lib" "git.j3s.sh/vore/reaper"

@@ -236,8 +237,10 @@ }

sessionToken := lib.GenerateSessionToken() s.db.SetSessionToken(username, sessionToken) http.SetCookie(w, &http.Cookie{ - Name: "session_token", - Value: sessionToken, + Name: "session_token", + // 18 years + Expires: time.Now().Add(time.Hour * 24 * 365 * 18), + Value: sessionToken, }) return nil }