diff --git a/api/src/Vfs/Sharing.php b/api/src/Vfs/Sharing.php index 7447814dd0..6f03a864a8 100644 --- a/api/src/Vfs/Sharing.php +++ b/api/src/Vfs/Sharing.php @@ -685,7 +685,7 @@ class Sharing if ($link[0] == '/') { $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']). $link; }