From: Roland Häder Date: Wed, 11 Apr 2018 21:29:28 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=082938e283bbd11f73ac56527c0d46599bc6f8da Continued: - better detection of HTTP(S) Signed-off-by: Roland Häder --- 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' + ) + ) + ); } /**