Fixes temporary the session cookie
parent
5fb2aa2fae
commit
cb26576eeb
|
@ -31,19 +31,18 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
// set session lifetime and cookies
|
// set session lifetime and cookies
|
||||||
ini_set('session.gc_maxlifetime', $gc_maxlifetime);
|
// FIXME: need to set this before session start (otherwise we need the separate cookie)
|
||||||
session_set_cookie_params([
|
// ini_set('session.gc_maxlifetime', $gc_maxlifetime);
|
||||||
'lifetime' => $setcookie_lifetime,
|
// session_set_cookie_params([
|
||||||
'samesite' => 'Strict',
|
// 'lifetime' => $setcookie_lifetime,
|
||||||
'httponly' => true,
|
// 'samesite' => 'Strict',
|
||||||
'secure' => isset($_SERVER['HTTPS']),
|
// 'httponly' => true,
|
||||||
'domain' => $config['domain'],
|
// 'secure' => isset($_SERVER['HTTPS']),
|
||||||
'path' => $config['folder']
|
// 'domain' => $config['domain'],
|
||||||
]);
|
// 'path' => $config['folder']
|
||||||
session_name($username);
|
// ]);
|
||||||
session_start();
|
// session_start();
|
||||||
|
// FIXME we use separate cookie, because the above won't work
|
||||||
// FIXME it doesn't set a cookie with session_set_cookie_params only
|
|
||||||
setcookie('username', $username, [
|
setcookie('username', $username, [
|
||||||
'expires' => $setcookie_lifetime,
|
'expires' => $setcookie_lifetime,
|
||||||
'path' => $config['folder'],
|
'path' => $config['folder'],
|
||||||
|
|
Loading…
Reference in New Issue