phpvms/config/session.php
Andrew Roberts fca04e6b0c
Allow session lifetime to be set in env variables (#1170)
* Allow session lifetime to be set in env variables

Currently the session live time defaults to 2 hours, adding an env variable will allow us to change this on a per site basis

* Add whitespace for consistency
2021-05-05 08:51:18 -04:00

33 lines
1.1 KiB
PHP
Executable File

<?php
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => 'mysql',
'table' => 'sessions',
'store' => null,
'lottery' => [1, 100],
'cookie' => 'phpvms_session',
'path' => '/',
'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', null),
'http_only' => true,
];