aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-03-16 23:51:49 -0700
committerfriendica <info@friendica.com>2012-03-16 23:51:49 -0700
commit511d8a30a05f76a08582f2d7a9ccd78dbd744c57 (patch)
tree7b334f512dbeb16f13e95c19e66a6d63b8c8b1da
parent2785bb413e4d84e93cb132c0492d79702ae1de90 (diff)
downloadvolse-hubzilla-511d8a30a05f76a08582f2d7a9ccd78dbd744c57.tar.gz
volse-hubzilla-511d8a30a05f76a08582f2d7a9ccd78dbd744c57.tar.bz2
volse-hubzilla-511d8a30a05f76a08582f2d7a9ccd78dbd744c57.zip
scheme checking for webservers without $_SERVER['HTTPS']
-rwxr-xr-xboot.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 322340e5d..836900fc4 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'];