fix(cookie): 🔒 fix warning message on firefox console, make cookie strict

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;`
}