summaryrefslogtreecommitdiff
path: root/src/web/index.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/index.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/web/index.php b/src/web/index.php
index e032ef2..75c1b62 100644
--- a/src/web/index.php
+++ b/src/web/index.php
@@ -19,14 +19,19 @@ require($webroot . '/core/loader.php');
require($webroot . '/core/router.php');
session_save_path('/var/lib/php/session');
-session_set_cookie_params(
- 60 * 60 * 24 * 365, // lifetime (seconds),
- '/', // path
- NULL, // domain,
- FALSE, // secure,
- FALSE // http only
-);
session_start();
+setcookie(
+ session_name(),
+ session_id(),
+ array(
+ 'expires' => time() + 60*60*24*7,
+ 'path' => '/',
+ 'domain' => NULL,
+ 'secure' => FALSE,
+ 'httponly' => FALSE,
+ 'samesite' => 'Lax'
+ )
+);
function __init() {
$load = new Loader();