public static isHTTPSConnection ( string $scheme = '' ) : boolean | ||
$scheme | string | |
return | boolean |
public static function isHTTPSConnection(string $scheme = '') : bool
{
if (empty($scheme)) {
$scheme = $_SERVER['HTTPS'] ?? false;
}
if (!empty($scheme)) {
return $scheme !== 'off';
}
return false;
}