From 10e07ce1cb3285e2c02a2e9a8bfaa7e42fab7f97 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Mon, 16 Sep 2019 14:24:40 +0200 Subject: [PATCH] fix url generation on local host Signed-off-by: Maxence Lange --- lib/Service/ConfigService.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 715ff8f5..514f73f0 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -342,6 +342,10 @@ class ConfigService { * @param string $cloudAddress */ public function setCloudUrl(string $cloudAddress) { + if (parse_url($cloudAddress, PHP_URL_SCHEME) === null) { + $cloudAddress = 'http://' . $cloudAddress; + } + $this->setAppValue(self::CLOUD_URL, $cloudAddress); } @@ -397,6 +401,10 @@ class ConfigService { ); } + if (parse_url($url, PHP_URL_SCHEME) === null) { + $url = 'http://' . $url; + } + $this->setAppValue(self::SOCIAL_URL, $url); }