]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 11 Apr 2018 21:29:28 +0000 (23:29 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 11 Apr 2018 21:29:28 +0000 (23:29 +0200)
- better detection of HTTP(S)

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/bootstrap/class_FrameworkBootstrap.php

index d7379e5b76d747977c61763b93dcc8b8ab634bb2..490e407940ceb0ed8e181305aba099928ff400e7 100644 (file)
@@ -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'
+                               )
+                       )
+               );
        }
 
        /**