change cookies from any site to strict
This commit is contained in:
parent
ad0f68d705
commit
7741556dc7
1 changed files with 7 additions and 7 deletions
|
@ -48,23 +48,23 @@ func saveUserSettings(w http.ResponseWriter, settings UserSettings) {
|
|||
Path: "/",
|
||||
Expires: expiration, // Expiration time needs to be set otherwise it will expire immediately
|
||||
Secure: true, // Ensure cookie is sent over HTTPS only
|
||||
SameSite: http.SameSiteNoneMode, // Set SameSite to None
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
})
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "language",
|
||||
Value: settings.Language,
|
||||
Path: "/",
|
||||
Expires: expiration,
|
||||
Secure: true, // Ensure cookie is sent over HTTPS only
|
||||
SameSite: http.SameSiteNoneMode, // Set SameSite to None
|
||||
Secure: true,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
})
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: "safe",
|
||||
Value: settings.SafeSearch,
|
||||
Path: "/",
|
||||
Expires: expiration,
|
||||
Secure: true, // Ensure cookie is sent over HTTPS only
|
||||
SameSite: http.SameSiteNoneMode, // Set SameSite to None
|
||||
Secure: true,
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
})
|
||||
|
||||
printDebug("settings saved: %v", settings)
|
||||
|
|
Loading…
Add table
Reference in a new issue