From 5af2555f59f13e06cf0ae65e5c0265d1d10bead8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20K=C3=B6nig?= Date: Thu, 11 Sep 2014 13:17:19 +0200 Subject: [PATCH] Implemented additional check for using the 'X-Forwarded-Port' header. --- inc/poche/Tools.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 55fedac8..93ec3fc6 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -54,6 +54,10 @@ final class Tools || ($https && $_SERVER["SERVER_PORT"] == '443') || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection ? '' : ':' . $_SERVER["SERVER_PORT"]); + + if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) { + $serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"]; + } $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); -- 2.41.0