From: friendica Date: Sat, 17 Mar 2012 06:51:49 +0000 (-0700) Subject: scheme checking for webservers without $_SERVER['HTTPS'] X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=511d8a30a05f76a08582f2d7a9ccd78dbd744c57;p=friendica.git scheme checking for webservers without $_SERVER['HTTPS'] --- diff --git a/boot.php b/boot.php index 322340e5d7..836900fc4a 100755 --- a/boot.php +++ b/boot.php @@ -286,7 +286,12 @@ class App { startup(); - $this->scheme = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'])) ? 'https' : 'http' ); + $this->scheme = 'http'; + if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) + $this->scheme = 'https'; + elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) + $this->scheme = 'https'; + if(x($_SERVER,'SERVER_NAME')) { $this->hostname = $_SERVER['SERVER_NAME'];