mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
express-session: Extend session lifetime if user is active
This commit is contained in:
parent
9c1f52f1b0
commit
692749d1cf
9 changed files with 68 additions and 10 deletions
|
@ -111,6 +111,12 @@ const handleClientVars = (message) => {
|
|||
// save the client Vars
|
||||
window.clientVars = message.data;
|
||||
|
||||
if (window.clientVars.sessionRefreshInterval) {
|
||||
const ping =
|
||||
() => $.ajax('../../_extendExpressSessionLifetime', {method: 'PUT'}).catch(() => {});
|
||||
setInterval(ping, window.clientVars.sessionRefreshInterval);
|
||||
}
|
||||
|
||||
// load all script that doesn't work without the clientVars
|
||||
BroadcastSlider = require('./broadcast_slider')
|
||||
.loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue