From 4d05fb92c3fae7afccf3bb869924c2a0662ab2c8 Mon Sep 17 00:00:00 2001 From: JohnnyJayJay Date: Mon, 16 Sep 2024 13:39:55 +0200 Subject: [PATCH] fix: set session cookie max-age to 5 days --- src/co/gaiwan/compass/http.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/co/gaiwan/compass/http.clj b/src/co/gaiwan/compass/http.clj index a820511..30e5779 100644 --- a/src/co/gaiwan/compass/http.clj +++ b/src/co/gaiwan/compass/http.clj @@ -31,7 +31,9 @@ :keywordize true} :cookies true :session {:flash true - :cookie-attrs {:http-only true} + :cookie-attrs {:http-only true + ;; 5 days + :max-age (* 60 60 24 5)} :store (session-cookie/cookie-store {:key "zsrpNuvjTqFcz6fg"})} :security {:anti-forgery true :frame-options :sameorigin