Fix installer ssl check (#1620)

* fix: replace removed function

* fix: correct http detection
This commit is contained in:
Albin Varghese authored and GitHub committed 2023-09-19 10:03:31 -07:00
1 parent bce4dc6941
commit f268f39fc8
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -418,7 +418,7 @@ final class Box_Installer
$data = [
'security' => [
'mode' => 'strict',
'force_https' => isSSL() ? true : false,
'force_https' => FOSSBilling\Tools::isHTTPS() ? true : false,
'cookie_lifespan' => 7200,
],
'debug' => false,
+1 -1
View File
@@ -291,6 +291,6 @@ class Tools
$protocol = $_SERVER['HTTPS'] ?? $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? $_SERVER['REQUEST_SCHEME'] ?? '';
// $_SERVER['HTTPS'] will be set to `on` to indicate HTTPS and the other to will be set to `https`, so either one means we are connected via HTTPS.
return (strcasecmp($protocol, 'on') === 0 || strcasecmp($protocol, 'https'));
return (strcasecmp($protocol, 'on') === 0 || strcasecmp($protocol, 'https') === 0);
}
}