mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-23 09:31:04 +00:00
fix #344 FQDN with non-standard ports broken
This commit is contained in:
parent
0c3db64585
commit
79024eb004
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue