(refactor) checkHTTPS Looks better this way, also fixes the log

This commit is contained in:
AGuyNamedJens 2023-03-30 22:17:08 +02:00 committed by IceToast
parent b1f6528605
commit 307aaee082

View file

@ -46,9 +46,9 @@ function checkWriteable(): bool
*/
function checkHTTPS(): bool
{
wh_log('https: ' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'true' : 'false', 'debug');
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|| $_SERVER['SERVER_PORT'] == 443;
$isHttps = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
wh_log('https: ' . $isHttps, 'debug');
return $isHttps;
}
/**