(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 function checkHTTPS(): bool
{ {
wh_log('https: ' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'true' : 'false', 'debug'); $isHttps = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') wh_log('https: ' . $isHttps, 'debug');
|| $_SERVER['SERVER_PORT'] == 443; return $isHttps;
} }
/** /**