From: Nicolas LÅ“uillet Date: Mon, 3 Feb 2014 11:46:09 +0000 (+0100) Subject: [fix] Add support for X-Forwarded-Proto header field #413 X-Git-Tag: 1.4.0^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=445a1a1c8de78bf7bba3404aa675e6a57ceefbfd;p=github%2Fwallabag%2Fwallabag.git [fix] Add support for X-Forwarded-Proto header field #413 --- 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'