Closed sohepalslamat closed 4 years ago
You can either use maxAge or expires, they are all properly documented in the library set or setAll methods.
maxAge
expires
set
setAll
cookies.set('cookie-name', 'cookie-value', { path: '/', maxAge: 60 * 60 * 24 * 7 })
Or
cookies.set('cookie-name', 'cookie-value', { path: '/', expires: new Date('2020-06-01') })
You can either use
maxAge
orexpires
, they are all properly documented in the libraryset
orsetAll
methods.Or