]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Implemented additional check for using the 'X-Forwarded-Port' header. 836/head
authorAndré König <andre.koenig@posteo.de>
Thu, 11 Sep 2014 11:17:19 +0000 (13:17 +0200)
committerAndré König <andre.koenig@posteo.de>
Thu, 11 Sep 2014 11:17:19 +0000 (13:17 +0200)
inc/poche/Tools.class.php

index 55fedac8df38fad0c87b6e3e8bf4029f0a6811f9..93ec3fc6a877bf93f00e7c0dfadfd2cdf2b412d8 100755 (executable)
@@ -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"]);