Make theme cookie samesite lax

pull/648/head
Svilen Markov 2025-05-05 13:30:14 +07:00
parent b075607bac
commit bf97829814
1 changed files with 4 additions and 3 deletions

@ -25,9 +25,10 @@ func (a *application) handleThemeChangeRequest(w http.ResponseWriter, r *http.Re
}
http.SetCookie(w, &http.Cookie{
Name: "theme",
Value: themeKey,
Path: a.Config.Server.BaseURL + "/",
Name: "theme",
Value: themeKey,
Path: a.Config.Server.BaseURL + "/",
SameSite: http.SameSiteLaxMode,
})
w.Header().Set("Content-Type", "text/css")