(refactor) checkHTTPS Looks better this way, also fixes the log
This commit is contained in:
parent
b1f6528605
commit
307aaee082
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue