aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-18 01:02:30 +0100
committerzottel <github@zottel.net>2012-03-18 01:02:30 +0100
commitdf78c9be0bab909dfa8cf196f7aaa4ea3423be8c (patch)
tree2dafebccd7de10089eef3dd1356a5760a280b590 /boot.php
parent3bbd82abb3b33f041ec35b85de5bddcd79ed5471 (diff)
parent26258bca77aa3385dacf36874f7f5603eaef9a6b (diff)
downloadvolse-hubzilla-df78c9be0bab909dfa8cf196f7aaa4ea3423be8c.tar.gz
volse-hubzilla-df78c9be0bab909dfa8cf196f7aaa4ea3423be8c.tar.bz2
volse-hubzilla-df78c9be0bab909dfa8cf196f7aaa4ea3423be8c.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 322340e5d..b0a631170 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'];
@@ -380,7 +385,7 @@ class App {
$scheme = $this->scheme;
if((x($this->config,'system')) && (x($this->config['system'],'ssl_policy'))) {
- if($this->config['system']['ssl_policy'] == SSL_POLICY_FULL)
+ if(intval($this->config['system']['ssl_policy']) === intval(SSL_POLICY_FULL))
$scheme = 'https';
// We need to populate the $ssl flag across the entire program before turning this on.