do NOT use hostname configured in setup, if it is the default localhost

stick with HTTP Host header in that case
This commit is contained in:
Ralf Becker 2018-03-21 11:44:48 +01:00 committed by Hadi Nategh
parent 045436609d
commit 21e123ef84

View File

@ -685,7 +685,7 @@ class Sharing
if ($link[0] == '/') if ($link[0] == '/')
{ {
$link = ($_SERVER['HTTPS'] ? 'https://' : 'http://'). $link = ($_SERVER['HTTPS'] ? 'https://' : 'http://').
($GLOBALS['egw_info']['server']['hostname'] ? ($GLOBALS['egw_info']['server']['hostname'] && $GLOBALS['egw_info']['server']['hostname'] !== 'localhost' ?
$GLOBALS['egw_info']['server']['hostname'] : $_SERVER['HTTP_HOST']). $GLOBALS['egw_info']['server']['hostname'] : $_SERVER['HTTP_HOST']).
$link; $link;
} }