From 1f4174355c7d826d5614b51a8c6f28b332e3fef3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Nov 2025 13:31:54 +0000 Subject: [PATCH] Add SameSite=Lax cookie attribute for better browser compatibility Some browsers were not accepting cookies without an explicit SameSite attribute. Added SameSite=Lax to the login cookie to ensure it works across all modern browsers. This fixes login issues where the cookie was being set by the server but not accepted/sent by the browser on subsequent requests. --- internal/handlers/web_handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/handlers/web_handler.go b/internal/handlers/web_handler.go index 0af84b3f..f65c48da 100644 --- a/internal/handlers/web_handler.go +++ b/internal/handlers/web_handler.go @@ -73,7 +73,8 @@ func (h *WebHandler) HandleLogin(c *gin.Context) { return } - // Set session cookie + // Set session cookie with explicit SameSite=Lax for better compatibility + c.SetSameSite(http.SameSiteLaxMode) c.SetCookie("tracks_token", resp.Token, 60*60*24*7, "/", "", false, true) // Redirect to dashboard