diff options
author | szaimen <szaimen@e.mail.de> | 2021-09-29 17:35:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-29 17:35:53 +0200 |
commit | 75b3263e80bc7509a19192a88fc3774f6a829885 (patch) | |
tree | ab04c6653eda2242b6946c41373a88e3314500a9 | |
parent | 5a469f54ab6877b690d585517186bb5fcf40546b (diff) | |
parent | 18d32a1ce70f092fe83af07da4fe0038e3fe2a7f (diff) | |
download | nextcloud-server-75b3263e80bc7509a19192a88fc3774f6a829885.tar.gz nextcloud-server-75b3263e80bc7509a19192a88fc3774f6a829885.zip |
Merge pull request #28995 from nextcloud/fix/initial_setup_redirect
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 f7fa6fa5632..511c37d2624 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; |