diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 7f0640207..8073a3fe8 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -60,6 +60,10 @@ class Tools } $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'])); + + if (strpos($host, ':') !== false) { + $serverport = ''; + } return 'http' . ($https ? 's' : '') . '://' . $host . $serverport . $scriptname;