]> git.p6c8.net - jirafeau_project.git/commitdiff
Add the test of HTTP_X_FORWARDED_PROTO in the is_ssl function to test the case where...
authorOlivier Esver <olg.esver@gmail.com>
Sun, 29 Mar 2015 11:37:50 +0000 (13:37 +0200)
committerOlivier Esver <olg.esver@gmail.com>
Sun, 29 Mar 2015 11:37:50 +0000 (13:37 +0200)
lib/functions.php

index 25464977b6eed6d2e8a2b4d3b68bafb8bb638fac..c2cad4653d209eab87a083dff6e359f90644f9d1 100644 (file)
@@ -98,6 +98,9 @@ function is_ssl() {
             return true;
     } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
         return true;
+    } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
+        if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
+            return true;
     }
     return false;
 }

patrick-canterino.de