From 21e123ef84734a69d3a99898ba159c7dfecabfdd Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 21 Mar 2018 11:44:48 +0100 Subject: [PATCH] do NOT use hostname configured in setup, if it is the default localhost stick with HTTP Host header in that case --- api/src/Vfs/Sharing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }