mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 06:08:48 +00:00
Handle very long pihole session lengths
This commit is contained in:
parent
d26ec27942
commit
f7def5c2ce
1 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,11 @@ async function login(widget, service) {
|
|||
logger.error("Failed to login to Pi-Hole API, status: %d", status);
|
||||
cache.del(`${sessionSIDCacheKey}.${service}`);
|
||||
} else {
|
||||
cache.put(`${sessionSIDCacheKey}.${service}`, dataParsed.session.sid, dataParsed.session.validity * 1000);
|
||||
cache.put(
|
||||
`${sessionSIDCacheKey}.${service}`,
|
||||
dataParsed.session.sid,
|
||||
Math.min(2147483647, dataParsed.session.validity * 1000), // https://github.com/ptarjan/node-cache/issues/84
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue