mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-11-11 01:13:41 +08:00
Merge pull request #325 from nextcloud/enh/noid/correctly-delete-old-sessions
correctly delete sessions older than 24h
This commit is contained in:
commit
b929d57a77
2 changed files with 2 additions and 5 deletions
|
@ -6,5 +6,7 @@ while true; do
|
|||
sudo -u www-data php /var/www/docker-aio/php/src/Cron/cron.php
|
||||
# Remove dangling images
|
||||
sudo -u www-data docker image prune -f
|
||||
# Remove sessions older than 24h
|
||||
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete
|
||||
sleep 1d
|
||||
done
|
||||
|
|
|
@ -22,11 +22,6 @@ ini_set('session.save_path', $dataConst->GetSessionDirectory());
|
|||
// Auto logout on browser close
|
||||
ini_set('session.cookie_lifetime', '0');
|
||||
|
||||
// Make sure to delete all stale sessions after at least one day
|
||||
ini_set('session.gc_maxlifetime', '86400');
|
||||
ini_set('session.gc_probability', '1');
|
||||
ini_set('session.gc_divisor', '1');
|
||||
|
||||
// Create app
|
||||
AppFactory::setContainer($container);
|
||||
$app = AppFactory::create();
|
||||
|
|
Loading…
Reference in a new issue