aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-03-04 15:26:24 +0100
committerGravatar GitHub <noreply@github.com> 2018-03-04 15:26:24 +0100
commitf0fd273199682881b805e968ca36df4ccdbfa7a1 (patch)
tree0f87fcc515fb493193f9c58a9a0ed19f4caf07e8 /lib
parent5ebeb9e3e5d46195a83211140c1d28d58be19b2a (diff)
parenta37b95f6779e6e2035f0efb72cf5144e7fad2ea3 (diff)
Merge pull request #1810 from FreshRSS/dev1.10.1
FreshRSS 1.10.1
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Request.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index f80b707d6..a43509ded 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -106,7 +106,8 @@ class Minz_Request {
$https = self::isHttps();
if (!empty($_SERVER['HTTP_HOST'])) {
- $host = $_SERVER['HTTP_HOST'];
+ //Might contain a port number, and mind IPv6 addresses
+ $host = parse_url('http://' . $_SERVER['HTTP_HOST'], PHP_URL_HOST);
} elseif (!empty($_SERVER['SERVER_NAME'])) {
$host = $_SERVER['SERVER_NAME'];
} else {