In branch koppelting HyphaRequest.php it reads:
public function getScheme() {
// Apache 2.4+ has REQUEST_SCHEME
if (array_key_exists('REQUEST_SCHEME', $_SERVER))
return $_SERVER['REQUEST_SCHEME'];
if (array_key_exists('HTTPS', $_SERVER) && $_SERVER['HTTPS'] == 'on')
return 'https';
return 'http';
}
In master it reads:
public function getScheme() {
// Apache 2.4+ has REQUEST_SCHEME
if (array_key_exists('REQUEST_SCHEME', $_SERVER))
return $_SERVER['REQUEST_SCHEME'];
if ($this->isSecure())
return 'https';
return 'http';
}
However, REQUEST_SCHEME is set by the rewrite module of Apache 2. This makes it impossible to set REQUEST_SCHEME from the Apache configuration, such as based upon yes/no X-Forward headers present or hard coded.
HTTPS variable is not set by rewrite module. There suggested change is to use:
public function getScheme() {
if (array_key_exists('HTTPS', $_SERVER) && $_SERVER['HTTPS'] == 'on')
return 'https';
// Apache 2.4+ has REQUEST_SCHEME
if (array_key_exists('REQUEST_SCHEME', $_SERVER))
return $_SERVER['REQUEST_SCHEME'];
return 'http';
}
so it is possible to use HTTP behind a HTTPS reverse proxy as in apache2.conf:
#
# Hypha.
#
<VirtualHost *:8080>
ServerName destadsbron.invantive.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/hypha
LogLevel info
ErrorLog /dev/stderr
CustomLog /dev/stdout combined
DirectoryIndex index.php
SetEnv HTTPS on
</VirtualHost>
In branch koppelting HyphaRequest.php it reads:
In master it reads:
However,
REQUEST_SCHEMEis set by the rewrite module of Apache 2. This makes it impossible to set REQUEST_SCHEME from the Apache configuration, such as based upon yes/no X-Forward headers present or hard coded.HTTPSvariable is not set by rewrite module. There suggested change is to use:so it is possible to use HTTP behind a HTTPS reverse proxy as in apache2.conf: