diff options
Diffstat (limited to 'lib/private/appframework/http/request.php')
-rw-r--r-- | lib/private/appframework/http/request.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index 7d6a49202c6..f826ef45bb5 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -659,11 +659,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @return string Server host */ public function getServerHost() { - // FIXME: Ugly workaround that we need to get rid of - if (\OC::$CLI && defined('PHPUNIT_RUN')) { - return 'localhost'; - } - // overwritehost is always trusted $host = $this->getOverwriteHost(); if ($host !== null) { @@ -681,7 +676,11 @@ class Request implements \ArrayAccess, \Countable, IRequest { return $host; } else { $trustedList = $this->config->getSystemValue('trusted_domains', []); - return $trustedList[0]; + if(!empty($trustedList)) { + return $trustedList[0]; + } else { + return ''; + } } } |