diff --git a/control/Director.php b/control/Director.php index b9c06a469..23316cd90 100644 --- a/control/Director.php +++ b/control/Director.php @@ -375,7 +375,7 @@ class Director implements TemplateGlobalProvider { */ static function protocol() { if(isset($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTOCOL']) == 'https') return "https://"; - return (isset($_SERVER['SSL']) || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 'https://' : 'http://'; + return (isset($_SERVER['SSL']) || (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')) ? 'https://' : 'http://'; } /**