[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Inf-IT DAVcl] CORS


however, this means we can't use it for a general purpose plugin as i
don't want to host my own calendar or modify some third party upstream
CORS setting.

thanks!

On 28.03.2018 17:39, Ján Máté wrote:
> Hi,
>
> the anwser to your question is exactly described in the responses below:
>
>
> Failed to load
> https://demo13.nextcloud.bayton.org/remote.php/dav/calendars/admin/personal/:
> *Response to preflight request doesn't pass access control check: No
> 'Access-Control-Allow-Origin' header is present on the requested
> resource. Origin 'null' is therefore not allowed access. The response
> had HTTP status code 401.*
>
> Error: [netCheckAndCreateConfiguration: 'PROPFIND
> https://admin:admin@xxxxxxxxxxxxxxxxxxxxxxxxxxx/remote.php/dav/calendars/admin/personal/']
> code: '0' status: 'error' - *see
> https://www.inf-it.com/caldavzap/readme.txt ;(cross-domain setup)*
>
> This is not CalDavZAP problem - it is a problem related to CORS
> (cross-origin resource sharing).
>
> So the answer is simple: *your server needs to add support CORS
> headers (or you need to configure it)*.
>
>
> Cheers,
>
>
> JM
>
>
>> On 28 Mar 2018, at 17:12, Joachim Schiele <js@xxxxxxxxxx
>> <mailto:js@xxxxxxxxxx>> wrote:
>>
>> hey,
>>
>> i wanted to create a wordpress plugin using caldavzap but while i was
>> able to use:
>>
>> https://demo13.nextcloud.bayton.org/apps/calendar/
>>
>> from thunderbird, it seems to fail from caldavzap:
>>
>> var globalNetworkCheckSettings={
>>   href:
>> "https://admin:admin@xxxxxxxxxxxxxxxxxxxxxxxxxxx/remote.php/dav/calendars/admin/personal/";,
>>   userAuth:
>>     {
>>       userName: 'admin',
>>       userPassword: 'admin'
>>     },
>>
>>   timeOut: 90000,
>>   lockTimeOut: 10000,
>>   checkContentType: true,
>>   settingsAccount: true,
>>   delegation: true,
>>   additionalResources: [],
>>   hrefLabel: null,
>>   forceReadOnly: null,
>>   ignoreAlarms: false,
>>   backgroundCalendars: []
>> }
>>
>> the error it reports is:
>>
>> OPTIONS
>> https://demo13.nextcloud.bayton.org/remote.php/dav/calendars/admin/personal/
>> 401 (Unauthorized)
>> 16:59:17.819
>> jquery-2.1.4.min.js:4 OPTIONS
>> https://demo13.nextcloud.bayton.org/remote.php/dav/calendars/admin/personal/
>> 401 (Unauthorized)
>>
>> Failed to load
>> https://demo13.nextcloud.bayton.org/remote.php/dav/calendars/admin/personal/:
>> Response to preflight request doesn't pass access control check: No
>> 'Access-Control-Allow-Origin' header is present on the requested
>> resource. Origin 'null' is therefore not allowed access. The response
>> had HTTP status code 401.
>>
>> Error: [netCheckAndCreateConfiguration: 'PROPFIND
>> https://admin:admin@xxxxxxxxxxxxxxxxxxxxxxxxxxx/remote.php/dav/calendars/admin/personal/']
>> code: '0' status: 'error' - see
>> https://www.inf-it.com/caldavzap/readme.txt (cross-domain setup)
>> 
>> we had also tried the calendar from config.js:
>>
>>   href: location.protocol+'//'+location.hostname+
>>     (location.port ? ':'+location.port: '')+
>>     location.pathname.replace(RegExp('/+[^/]+/*(index\.html)?$'),'')+
>>     '/caldav.php/',
>>
>> but this also failed.
>>
>>
>> the overall question now would be:
>>
>> can one use these two callendards without doing server side
>> modifications to it?
>>
>> if a server side modification would be required to use caldavzap then
>> one would not be able to use caldavzap with an arbitrary online resource
>> and ATM i think that this is the case.
>>
>> can someone please tell me that i'm wrong plz?
>>
>> regards,
>>
>> joachim schiele
>>
>>
>>
>> -- 
>> Joachim Schiele
>> nixcloud GmbH
>>
>> 004915204145347
>>
>> blog: http://lastlog.de/blog
>> wiki: http://lastlog.de/wiki
>> GPG: C11CFB9FFA7A5F4EEDCC59BCAC10E1AC6D8F75EE (here:
>> https://lastlog.de/blog/about.html)
>>
>>
>>
>>
>

-- 
Joachim Schiele
nixcloud GmbH

004915204145347

blog: http://lastlog.de/blog
wiki: http://lastlog.de/wiki
GPG: C11CFB9FFA7A5F4EEDCC59BCAC10E1AC6D8F75EE (here: https://lastlog.de/blog/about.html)



References:
[Inf-IT DAVcl] CORSJoachim Schiele <js@xxxxxxxxxx>
Re: [Inf-IT DAVcl] CORSJán Máté <jan.mate@xxxxxxxxxx>