<?php
+$http_host=$_SERVER["HTTP_HOST"];
+if (substr($http_host, 0, strlen("agendav.")) == "agendav.") {
+ $http_host = substr($http_host, strlen("agendav."));
+ }
+
$scheme = 'http';
if (strtolower($_SERVER['HTTPS']) == 'on') {
$scheme = 'https';
}
-$config['caldav_calendar_url'] = "$scheme://davical.heureux-cyclage.org/caldav.php/%s/";
+$config['caldav_calendar_url'] = "$scheme://davical.$http_host/caldav.php/%s/";
$config['caldav_http_auth_method'] = CURLAUTH_BASIC;
-$config['caldav_principal_url'] = "$scheme://davical.heureux-cyclage.org/caldav.php/%u/";
+$config['caldav_principal_url'] = "$scheme://davical.$http_host/caldav.php/%u/";
$config['default_permissions'] = array('C:read-free-busy');
$config['enable_calendar_sharing'] = TRUE;
$config['owner_permissions'] = array
, 'bind'
, 'unbind'
);
-$config['public_caldav_url'] = "$scheme://davical.heureux-cyclage.org/caldav.php/%s/";
+$config['public_caldav_url'] = "$scheme://davical.$http_host/caldav.php/%s/";
$config['read_profile_permissions'] = array
( 'read'
, 'C:read-free-busy'