mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-08 00:08:14 +01:00
cookie lifetime
This commit is contained in:
parent
2c90bba774
commit
f6113e85c7
@ -120,14 +120,14 @@ class Auth {
|
|||||||
if (req.query.isRest && req.query.isRest.toLowerCase() == "true") {
|
if (req.query.isRest && req.query.isRest.toLowerCase() == "true") {
|
||||||
// store the isRest flag to the is_rest cookie
|
// store the isRest flag to the is_rest cookie
|
||||||
res.cookie('is_rest', req.query.isRest.toLowerCase(), {
|
res.cookie('is_rest', req.query.isRest.toLowerCase(), {
|
||||||
maxAge: 120000 * 120, // Hack - this semms to be in UTC??
|
maxAge: 120000, // 2 min
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no isRest-flag set -> set is_rest cookie to false
|
// no isRest-flag set -> set is_rest cookie to false
|
||||||
res.cookie('is_rest', "false", {
|
res.cookie('is_rest', "false", {
|
||||||
maxAge: 120000 * 120, // Hack - this semms to be in UTC??
|
maxAge: 120000, // 2 min
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ class Auth {
|
|||||||
}
|
}
|
||||||
// store the callback url to the auth_cb cookie
|
// store the callback url to the auth_cb cookie
|
||||||
res.cookie('auth_cb', req.query.callback, {
|
res.cookie('auth_cb', req.query.callback, {
|
||||||
maxAge: 120000 * 120, // Hack - this semms to be in UTC??
|
maxAge: 120000, // 2 min
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user