fix(cookie): 🔒 fix warning message on firefox console, make cookie strict
This commit is contained in:
parent
3ec978be7e
commit
227b3eb938
|
@ -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;`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue