summaryrefslogtreecommitdiffstats
path: root/lib/kolab_client_task.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kolab_client_task.php')
-rw-r--r--lib/kolab_client_task.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 7cc8863..6a6fac1 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -103,11 +103,11 @@ class kolab_client_task
*/
private function api_init()
{
- $url = $this->config_get('api_url', '');
+ $url = $this->config_get('api_url', '');
if (!$url) {
- // @TODO: http/https
- $url = 'http://' . $_SERVER['SERVER_NAME'];
+ $url = kolab_utils::https_check() ? 'https://' : 'http://';
+ $url .= $_SERVER['SERVER_NAME'];
$url .= preg_replace('/\/?\?.*$/', '', $_SERVER['REQUEST_URI']);
$url .= '/api';
}