diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-09-16 20:09:58 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-09-16 20:09:58 +0200 |
commit | b3c720b1c31881f7addf8752340825181a4adc27 (patch) | |
tree | 6c3864a324ad4d534e286c7b926aa34e2872678b /inc/poche/Tools.class.php | |
parent | 49882dc1517e84e33cea247f2e635691d1439904 (diff) | |
parent | 5af2555f59f13e06cf0ae65e5c0265d1d10bead8 (diff) | |
download | wallabag-b3c720b1c31881f7addf8752340825181a4adc27.tar.gz wallabag-b3c720b1c31881f7addf8752340825181a4adc27.tar.zst wallabag-b3c720b1c31881f7addf8752340825181a4adc27.zip |
Merge pull request #836 from akoenig/x-forwarded-port
Implemented additional check for using the 'X-Forwarded-Port' header.
Diffstat (limited to 'inc/poche/Tools.class.php')
-rwxr-xr-x | inc/poche/Tools.class.php | 4 |
1 files changed, 4 insertions, 0 deletions
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 | |||
54 | || ($https && $_SERVER["SERVER_PORT"] == '443') | 54 | || ($https && $_SERVER["SERVER_PORT"] == '443') |
55 | || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection | 55 | || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection |
56 | ? '' : ':' . $_SERVER["SERVER_PORT"]); | 56 | ? '' : ':' . $_SERVER["SERVER_PORT"]); |
57 | |||
58 | if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) { | ||
59 | $serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"]; | ||
60 | } | ||
57 | 61 | ||
58 | $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); | 62 | $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); |
59 | 63 | ||