fix(cookie): 🔒 fix warning message on firefox console, make cookie strict
All checks were successful
repod / xml (push) Successful in 11s
repod / php (push) Successful in 29s
repod / nodejs (push) Successful in 1m55s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-03-05 12:08:56 +01:00
parent 3ec978be7e
commit 227b3eb938

View File

@ -24,5 +24,5 @@ export const getCookie = (name) => {
export const setCookie = (name, value, days) => {
const date = new Date()
date.setDate(date.getDate() + days)
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${date.toUTCString()};`
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${date.toUTCString()}; SameSite=Strict;`
}