diff options
author | Freya Murphy <freya@freyacat.org> | 2024-05-28 21:03:16 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-05-28 21:03:16 -0400 |
commit | 268dfc987664416db099761d51a5c007eb926904 (patch) | |
tree | 8272ea615092a412d9da567e70e9468027219c8c /src/web/index.php | |
parent | e (diff) | |
download | xssbook2-268dfc987664416db099761d51a5c007eb926904.tar.gz xssbook2-268dfc987664416db099761d51a5c007eb926904.tar.bz2 xssbook2-268dfc987664416db099761d51a5c007eb926904.zip |
fix date
Diffstat (limited to 'src/web/index.php')
-rw-r--r-- | src/web/index.php | 19 |
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(); |