fix: blank page on channel click + logout issue

This commit is contained in:
2026-06-29 14:16:32 -04:00
parent a7da8104d7
commit 175ec90705
4 changed files with 37 additions and 28 deletions
+1 -6
View File
@@ -10,11 +10,6 @@ import (
// Shared by password login, registration, and WebAuthn login.
func SetSessionCookie(w http.ResponseWriter, cookieName, token string, duration time.Duration) {
secure := os.Getenv("COOKIE_SECURE") == "true"
sameSite := http.SameSiteLaxMode
if secure {
sameSite = http.SameSiteStrictMode
}
http.SetCookie(w, &http.Cookie{
Name: cookieName,
@@ -22,7 +17,7 @@ func SetSessionCookie(w http.ResponseWriter, cookieName, token string, duration
Path: "/",
HttpOnly: true,
Secure: secure,
SameSite: sameSite,
SameSite: http.SameSiteDefaultMode,
MaxAge: int(duration.Seconds()),
})
}