fix(cookies): fix variable naming and extend to two days maxAge
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const ONE_YEAR_IN_SECONDS = 86400
|
const TWO_DAYS_IN_SECONDS = 172800 // 60 * 60 * 24 * 2
|
||||||
module.exports.updateCookie = (response, cookieName, value) => {
|
module.exports.updateCookie = (response, cookieName, value) => {
|
||||||
response.cookie(cookieName, value, { maxAge: ONE_YEAR_IN_SECONDS, httpOnly: true })
|
response.cookie(cookieName, value, { maxAge: TWO_DAYS_IN_SECONDS, httpOnly: true })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user