1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-12-24 08:18:48 -05:00

Merge pull request #836 from akoenig/x-forwarded-port

Implemented additional check for using the 'X-Forwarded-Port' header.
This commit is contained in:
Nicolas Lœuillet 2014-09-16 20:09:58 +02:00
commit b3c720b1c3

View File

@ -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"]);