fix login if non-standard ports are used for froxlor vhost

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-01-10 12:43:04 +01:00
parent 24f47bc58b
commit cc6d8d5f8b
2 changed files with 2 additions and 2 deletions

View File

@@ -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['HTTP_HOST'],
'domain' => $_SERVER['SERVER_NAME'],
'secure' => self::requestIsHttps(),
'httponly' => true,
'samesite' => 'Strict'

View File

@@ -332,7 +332,7 @@ if (CurrentUser::hasSession()) {
$cookie_params = [
'expires' => time() + Settings::Get('session.sessiontimeout'),
'path' => '/',
'domain' => $_SERVER['HTTP_HOST'],
'domain' => $_SERVER['SERVER_NAME'],
'secure' => UI::requestIsHttps(),
'httponly' => true,
'samesite' => 'Strict'