mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #28998 from nextcloud/backport/28995/stable22
[stable22] Fix redirect during initial setup
This commit is contained in:
commit
115ae98142
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue