1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 03:12:21 -05:00

Implemented additional check for using the 'X-Forwarded-Port' header.

This commit is contained in:
André König 2014-09-11 13:17:19 +02:00
parent 49882dc151
commit 5af2555f59

View File

@ -55,6 +55,10 @@ final class Tools
|| ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection || ($https && $_SERVER["SERVER_PORT"]==SSL_PORT) //Custom HTTPS port detection
? '' : ':' . $_SERVER["SERVER_PORT"]); ? '' : ':' . $_SERVER["SERVER_PORT"]);
if (isset($_SERVER["HTTP_X_FORWARDED_PORT"])) {
$serverport = ':' . $_SERVER["HTTP_X_FORWARDED_PORT"];
}
$scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]); $scriptname = str_replace('/index.php', '/', $_SERVER["SCRIPT_NAME"]);
if (!isset($_SERVER["HTTP_HOST"])) { if (!isset($_SERVER["HTTP_HOST"])) {