RVRNEXT-33 session should be valid for a session
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
This commit is contained in:
parent
845a48371f
commit
4aca432257
12
web.php
12
web.php
@ -94,22 +94,12 @@ Container::$sessionHandler = new DatabaseSessionHandler(Container::$dbConnection
|
||||
session_set_save_handler(Container::$sessionHandler, true);
|
||||
session_start([
|
||||
'gc_probability' => 0, // old sessions are deleted by MaintainDatabaseCommand
|
||||
'cookie_lifetime' => 604800,
|
||||
'cookie_lifetime' => 0,
|
||||
'cookie_path' => '/',
|
||||
'cookie_httponly' => true,
|
||||
'cookie_samesite' => 'Lax'
|
||||
]);
|
||||
|
||||
if (isset($_COOKIE[session_name()])) {
|
||||
// extend session cookie lifetime is cookie already exists
|
||||
setcookie(session_name(), session_id(), [
|
||||
'expires' => time() + 604800,
|
||||
'path' => '/',
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax'
|
||||
]);
|
||||
}
|
||||
|
||||
Container::$request = new Request(
|
||||
$_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'],
|
||||
$_GET,
|
||||
|
Loading…
Reference in New Issue
Block a user