diff --git a/web/index.php b/web/index.php index fae6d5e21..4a37241a7 100644 --- a/web/index.php +++ b/web/index.php @@ -51,9 +51,12 @@ require_once( 'includes/Event.php' ); require_once( 'includes/Group.php' ); require_once( 'includes/Monitor.php' ); -if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; -if ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ) { +if ( + (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') + or + ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') +) { $protocol = 'https'; } else { $protocol = 'http';