refactor: streamline session management

This commit is contained in:
2026-08-30 19:54:34 +02:00
parent b364bee265
commit 0ee0874458
+2 -2
View File
@@ -46,7 +46,7 @@ func (s *Server) setSessionCookie(w http.ResponseWriter, token string) {
Value: token,
Path: "/",
HttpOnly: true,
Secure: s.cfg.TLS.Enabled,
Secure: true,
SameSite: http.SameSiteLaxMode,
Expires: time.Now().Add(7 * 24 * time.Hour),
})
@@ -58,7 +58,7 @@ func (s *Server) clearSessionCookie(w http.ResponseWriter) {
Value: "",
Path: "/",
HttpOnly: true,
Secure: s.cfg.TLS.Enabled,
Secure: true,
SameSite: http.SameSiteLaxMode,
MaxAge: -1,
})