This is more error tolerant

This commit is contained in:
slawkens 2023-11-07 22:15:23 +01:00
parent 7dd9b7764a
commit 9d119b6279

View File

@ -172,5 +172,5 @@ function isHttps(): bool
return
(!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')
|| (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|| $_SERVER['SERVER_PORT'] == 443;
|| (isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] === 443);
}