diff options
Diffstat (limited to '')
-rw-r--r-- | src/web/helpers/auth.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/web/helpers/auth.php b/src/web/helpers/auth.php index 3ff1e71..9228706 100644 --- a/src/web/helpers/auth.php +++ b/src/web/helpers/auth.php @@ -13,13 +13,18 @@ function get_cookie() { function store_cookie($key) { $cookie_name = 'X-LDAP-Auth-Key'; + $cookie_options = array ( + 'expires' => time() + 60*60*24*30, + 'path' => '/', + 'domain' => getenv("COOKIE_DOMAIN"), + 'secure' => true, + 'httponly' => true, + 'samesite' => 'None' + ); setcookie( $cookie_name, $key, - time() + (86400 * 30), - "/", - TRUE, - TRUE + $cookie_options ); } |