adding x-forwarded-proto = https management to detet https too

This commit is contained in:
Benjamin Sonntag 2017-06-07 14:31:30 +02:00
parent fcf14400da
commit 6d72cc522b
1 changed files with 3 additions and 0 deletions

View File

@ -167,6 +167,9 @@ $err = new m_err();
$authip = new m_authip(); $authip = new m_authip();
$hooks = new m_hooks(); $hooks = new m_hooks();
if (!isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"]=="https") {
$_SERVER["HTTPS"]="on";
}
// https: Redirection if not calling https://!fqdn or if https is forced // https: Redirection if not calling https://!fqdn or if https is forced
if ((variable_get('force_https', '0', "This variable is set to 0 (default) if users can access the management desktop through HTTP, otherwise we force HTTPS")&&(!isset($_SERVER["HTTPS"])|| ($_SERVER["HTTPS"] != "on")))) { if ((variable_get('force_https', '0', "This variable is set to 0 (default) if users can access the management desktop through HTTP, otherwise we force HTTPS")&&(!isset($_SERVER["HTTPS"])|| ($_SERVER["HTTPS"] != "on")))) {