From b4868d9e62bfdd1dbbe7bedddbe5ee3051cf7f41 Mon Sep 17 00:00:00 2001 From: Ryan Stafford Date: Sun, 2 Jul 2023 23:10:33 -0400 Subject: [PATCH] cookie max age --- routes.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/routes.go b/routes.go index c8c089c..94253a8 100644 --- a/routes.go +++ b/routes.go @@ -461,9 +461,10 @@ func setCookie(w http.ResponseWriter, host string, name string, value string) { host = "" } cookie := http.Cookie{ - Name: name, - Value: value, - Path: "/" + host, + Name: name, + Value: value, + MaxAge: 86400 * 30, + Path: "/" + host, } http.SetCookie(w, &cookie) }