From 511d8a30a05f76a08582f2d7a9ccd78dbd744c57 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Mar 2012 23:51:49 -0700 Subject: [PATCH] scheme checking for webservers without $_SERVER['HTTPS'] --- boot.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'];