diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-12-03 19:54:48 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-12-03 19:59:50 +0100 |
commit | 69f5f6649e05dd404aa67fab95c5bb34e9ce4d1f (patch) | |
tree | e32a952022705582e372ed4fb246172e120404f2 /lib/private/setup.php | |
parent | 8700ffe69809d7551a08f224537650b43add2a59 (diff) | |
download | nextcloud-server-69f5f6649e05dd404aa67fab95c5bb34e9ce4d1f.tar.gz nextcloud-server-69f5f6649e05dd404aa67fab95c5bb34e9ce4d1f.zip |
Trim port from domain
Depending on the used environment the port might be appended to the host header resulting in an inaccessible instance when initially setting up on a system with a different HTTP or HTTPS port. (for example test:500)
To test this setup ownCloud under a different port with and without this patch. (heads-up: localhost is always white-listed, so use a different domain)
Diffstat (limited to 'lib/private/setup.php')
-rw-r--r-- | lib/private/setup.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php index 1443de18546..e5eb2bac194 100644 --- a/lib/private/setup.php +++ b/lib/private/setup.php @@ -162,7 +162,7 @@ class OC_Setup { && is_array($options['trusted_domains'])) { $trustedDomains = $options['trusted_domains']; } else { - $trustedDomains = array(OC_Request::serverHost()); + $trustedDomains = array(\OC_Request::getDomainWithoutPort(\OC_Request::serverHost())); } if (OC_Util::runningOnWindows()) { |