diff options
author | szaimen <szaimen@e.mail.de> | 2021-09-29 19:56:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 19:56:11 +0300 |
commit | e362202ee7602bdd17d5444e65858cbeab10dd36 (patch) | |
tree | 70e164495f158e202613067aeb362d67e1774212 | |
parent | bef65f09f554f7b5c2d9cbbb7539ab40f0005752 (diff) | |
parent | fbf3645598aa1d791bf0a0d1639c5ffc50935f47 (diff) |
Merge pull request #28999 from nextcloud/backport/28995/stable21
[stable21] Fix redirect during initial setup
-rw-r--r-- | lib/private/URLGenerator.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index 12d3a898696..6dbe396362d 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -271,7 +271,8 @@ class URLGenerator implements IURLGenerator { * @return string base url of the current request */ public function getBaseUrl(): string { - if ($this->baseUrl === null) { + // BaseUrl can be equal to 'http(s)://' during the first steps of the intial setup. + if ($this->baseUrl === null || $this->baseUrl === "http://" || $this->baseUrl === "https://") { $this->baseUrl = $this->request->getServerProtocol() . '://' . $this->request->getServerHost() . \OC::$WEBROOT; } return $this->baseUrl; |