summaryrefslogtreecommitdiffstats
path: root/lib/private/setup.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/setup.php')
-rw-r--r--lib/private/setup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php
index e3a29b6469d..a3b46c1eb4f 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -157,12 +157,14 @@ class OC_Setup {
return $error;
}
+ $request = \OC::$server->getRequest();
+
//no errors, good
if(isset($options['trusted_domains'])
&& is_array($options['trusted_domains'])) {
$trustedDomains = $options['trusted_domains'];
} else {
- $trustedDomains = array(\OC_Request::getDomainWithoutPort(\OC_Request::serverHost()));
+ $trustedDomains = [\OCP\Util::getServerHostName()];
}
if (OC_Util::runningOnWindows()) {
@@ -185,7 +187,7 @@ class OC_Setup {
'secret' => $secret,
'trusted_domains' => $trustedDomains,
'datadirectory' => $dataDir,
- 'overwrite.cli.url' => \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . OC::$WEBROOT,
+ 'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getServerHost() . OC::$WEBROOT,
'dbtype' => $dbType,
'version' => implode('.', OC_Util::getVersion()),
]);