From 082938e283bbd11f73ac56527c0d46599bc6f8da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 11 Apr 2018 23:29:28 +0200 Subject: [PATCH] Continued: - better detection of HTTP(S) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- framework/bootstrap/class_FrameworkBootstrap.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/framework/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php index d7379e5b..490e4079 100644 --- a/framework/bootstrap/class_FrameworkBootstrap.php +++ b/framework/bootstrap/class_FrameworkBootstrap.php @@ -477,7 +477,21 @@ final class FrameworkBootstrap { * @todo Test more fields */ public static function isHttpSecured () { - return (isset($_SERVER['HTTPS'])); + return ( + ( + ( + isset($_SERVER['HTTPS']) + ) && ( + strtolower($_SERVER['HTTPS']) == 'on' + ) + ) || ( + ( + isset($_SERVER['HTTP_X_FORWARDED_PROTO']) + ) && ( + strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' + ) + ) + ); } /** -- 2.39.5