mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Auto-extend session if loading the home page
This commit is contained in:
@@ -559,6 +559,12 @@ async function setUserDataMiddleware(request, response, next) {
|
||||
profile: user,
|
||||
directories: directories,
|
||||
};
|
||||
|
||||
// Touch the session if loading the home page
|
||||
if (request.method === 'GET' && request.path === '/') {
|
||||
request.session.touch = Date.now();
|
||||
}
|
||||
|
||||
return next();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user