X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=62baf116da28c57026b18cb01a670c9c17ede83d;hb=0adff6f6b893bd7562547bb00021f358383f51ba;hp=eeef666ae96200e9cd634b75d79112aa717c5f43;hpb=89f4d9f164fd10e2b565679b19838932cb09a98f;p=friendica.git diff --git a/boot.php b/boot.php index eeef666ae9..62baf116da 100644 --- a/boot.php +++ b/boot.php @@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1196 ); +define ( 'DB_UPDATE_VERSION', 1197 ); /** * @brief Constant with a HTML line break. @@ -587,10 +587,15 @@ class App { $this->scheme = 'http'; - if(x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) - $this->scheme = 'https'; - elseif(x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) + if((x($_SERVER,'HTTPS') && $_SERVER['HTTPS']) || + (x($_SERVER['HTTP_FORWARDED']) && preg_match("/proto=https/", $_SERVER['HTTP_FORWARDED'])) || + (x($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') || + (x($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') || + (x($_SERVER['FRONT_END_HTTPS']) && $_SERVER['FRONT_END_HTTPS'] == 'on') || + (x($_SERVER,'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) // XXX: reasonable assumption, but isn't this hardcoding too much? + ) { $this->scheme = 'https'; + } if(x($_SERVER,'SERVER_NAME')) { $this->hostname = $_SERVER['SERVER_NAME'];