From 92660e5c44d25cee93a7a9f531eb30f4ae9c061d Mon Sep 17 00:00:00 2001 From: Olivier Esver Date: Sun, 29 Mar 2015 13:37:50 +0200 Subject: [PATCH] Add the test of HTTP_X_FORWARDED_PROTO in the is_ssl function to test the case where Jirafeau is behind an apache reverse proxy --- lib/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/functions.php b/lib/functions.php index 2546497..c2cad46 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -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; } -- 2.34.1