From: Jérôme Date: Sun, 29 Mar 2015 20:55:18 +0000 (+0000) Subject: Merge branch 'master' into 'master' X-Git-Tag: 1.1~126 X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/commitdiff_plain/1d3b28bffcd40c3bcee468b2b4cdf284dfe56a1a?hp=d496172554ae4ab0dac6e9d7a1e77eb8fd3749df Merge branch 'master' into 'master' 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 See merge request !2 --- 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; }