diff --git a/lib/Froxlor/UI/Panel/UI.php b/lib/Froxlor/UI/Panel/UI.php index 10ee15e9..d7fc0d25 100644 --- a/lib/Froxlor/UI/Panel/UI.php +++ b/lib/Froxlor/UI/Panel/UI.php @@ -95,7 +95,7 @@ class UI session_set_cookie_params([ 'lifetime' => self::$install_mode ? 7200 : 600, // will be renewed based on settings in lib/init.php 'path' => '/', - 'domain' => $_SERVER['SERVER_NAME'], + 'domain' => explode(':', $_SERVER['HTTP_HOST'])[0], 'secure' => self::requestIsHttps(), 'httponly' => true, 'samesite' => 'Strict' diff --git a/lib/init.php b/lib/init.php index 16170a01..cf683be6 100644 --- a/lib/init.php +++ b/lib/init.php @@ -332,7 +332,7 @@ if (CurrentUser::hasSession()) { $cookie_params = [ 'expires' => time() + Settings::Get('session.sessiontimeout'), 'path' => '/', - 'domain' => $_SERVER['SERVER_NAME'], + 'domain' => explode(':', $_SERVER['HTTP_HOST'])[0], 'secure' => UI::requestIsHttps(), 'httponly' => true, 'samesite' => 'Strict'