fix: blank page on channel click + logout issue
This commit is contained in:
@@ -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()),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user