From 445a1a1c8de78bf7bba3404aa675e6a57ceefbfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 3 Feb 2014 12:46:09 +0100 Subject: [fix] Add support for X-Forwarded-Proto header field #413 --- inc/poche/Tools.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 248a44d7..515a08aa 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -43,7 +43,9 @@ class Tools || (isset($_SERVER["SERVER_PORT"]) && $_SERVER["SERVER_PORT"] == '443') // HTTPS detection. || (isset($_SERVER["SERVER_PORT"]) //Custom HTTPS port detection - && $_SERVER["SERVER_PORT"] == SSL_PORT); + && $_SERVER["SERVER_PORT"] == SSL_PORT) + || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) + && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'); $serverport = (!isset($_SERVER["SERVER_PORT"]) || $_SERVER["SERVER_PORT"] == '80' -- cgit v1.2.3