I try the globalSubscribedCalendars with no success.
var globalSubscribedCalendars={ hrefLabel: 'Volley', calendars: [ { href: 'https://calendrier.charentonvolley.fr/smn1', userAuth: { }, typeList: ['vevent'], ignoreAlarm: true, displayName: 'N1', color: '#ff0000' } ] };
I have configured the apache serveur with informations in config_davical.txt for the CORS headers. Perhaps I do need to create a real CalDAV account ?
If I cannot use my calendar php script, I will import my calendar in a davical server because I known that it is working with the same CORS headers.
$ curl -i https://calendrier.charentonvolley.fr/smn1 HTTP/1.1 200 OK Date: Mon, 16 Apr 2018 12:32:31 GMT Server: Apache/2.4.25 (Debian) Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET,POST,OPTIONS,PROPFIND,PROPPATCH,REPORT,PUT,MOVE,DELETE,LOCK,UNLOCK Access-Control-Allow-Headers: User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With Access-Control-Allow-Credentials: false Access-Control-Expose-Headers: Etag,Preference-Applied Content-Disposition: inline; filename=smn1.ics Content-Length: 1407 Content-Type: text/calendar; charset=utf-8
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//CHARENTONVOLLEY//www.charentonvolley.fr//FR CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:Europe/Paris BEGIN:DAYLIGHT TZOFFSETFROM:+0100 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU DTSTART:19810329T020000 TZNAME:UTC+2 TZOFFSETTO:+0200 END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:+0200 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU DTSTART:19961027T030000 TZNAME:UTC+1 TZOFFSETTO:+0100 END:STANDARD END:VTIMEZONE BEGIN:VEVENT ORGANIZER;CN=CNM Charenton Volley-Ball:MAILTO:contact@charentonvolley.fr SUMMARY:Élite Sénior Masculin DESCRIPTION:Élite DTSTAMP:20180415T060001Z DTSTART;TZID=Europe/Paris:20180428T200000 DTEND;TZID=Europe/Paris:20180428T214500 CATEGORIES:MATCH,SMN1 URL;VALUE=URI:http://www.charentonvolley.fr/nos-equipes/smn1/ UID:CNM/VOLLEY/smn1/2018-04-28/20:00 LOCATION:BEAUVAIS OISE UC VOLLEY - Pierre De Coubertin END:VEVENT BEGIN:VEVENT ORGANIZER;CN=CNM Charenton Volley-Ball:MAILTO:contact@charentonvolley.fr SUMMARY:Élite Sénior Masculin DESCRIPTION:Élite DTSTAMP:20180415T060002Z DTSTART;TZID=Europe/Paris:20180505T200000 DTEND;TZID=Europe/Paris:20180505T214500 CATEGORIES:MATCH,SMN1 URL;VALUE=URI:http://www.charentonvolley.fr/nos-equipes/smn1/ UID:CNM/VOLLEY/smn1/2018-05-05/20:00 LOCATION;ALTREP="http://www.charentonvolley.fr/le-club/gymnases/%22:Nelson P aillou GEO:48.822947;2.412597 END:VEVENT END:VCALENDAR
Jean-Luc
Le 16 avr. 2018 à 11:32, Ján Máté jan.mate@inf-it.com a écrit :
Hi,
the globalAccountSettings option is NOT for subscription - it expects real CalDAV responses from the remote server. There is another option called globalSubscribedCalendars which downloads the ics file from the given URL and then process it (however I'm not sure if it will work without a real CalDAV account in globalAccountSettings - I never tested that kind of setup).
Also the globalSubscribedCalendars work ONLY if the server response contains proper CORS headers (built-in browser security).
Cheers,
JM
On 16 Apr 2018, at 10:26, Jean-Luc Mounier Jean-Luc.Mounier@lip6.fr wrote:
Hi,
I have created a php script which produces .ics files from Volley match teams. These calendars are read only calendars and access is free (no login/password).
I can subscribe theses calendars in many different applications but CalDavZAP 0.13.1 gives me a white page.
I have manually add OPTIONS and PROPFIND http answers but I'n not really sure that it is correct. I think I don't understand the meaning these elements and what are the minimum answer.
FireFox tells me that there is an XML error but I don't know where ?
Here a part of the config.js file
var globalAccountSettings=[ {href: 'https://calendrier.charentonvolley.fr:443/smn1', hrefLabel: 'N1', forceReadOnly: true, settingsAccount: false, checkContentType: true, userAuth: {userName: '', userPassword: ''}, timeOut: 90000, lockTimeOut: 10000, delegation: false, ignoreAlarms: true, backgroundCalendars: []}, ];
Jean-Luc