add cookie maxage for 1 year

This commit is contained in:
teddit 2020-11-22 13:21:47 +01:00
parent 8be9612552
commit 348e88fee4
1 changed files with 1 additions and 1 deletions

View File

@ -682,7 +682,7 @@ module.exports = (app, redis, fetch, RedditAPI) => {
app.post('/saveprefs', (req, res, next) => {
let theme = req.body.theme
res.cookie('theme', theme, { maxAge: 900000, httpOnly: true })
res.cookie('theme', theme, { maxAge: 365 * 24 * 60 * 60 * 1000, httpOnly: true })
return res.redirect('/preferences')
})