[ckan-dev] datastore API ajax request not working. 409 conflict
Stéphane Guidoin
stephane.guidoin at gmail.com
Wed Oct 7 17:14:29 UTC 2015
> I agree that jsonp is a nice thing to have.
Yes, but CORS should work also (if you browser supports it
http://enable-cors.org/client.html). Depending on the CKAN version it is
possible to enable it in the configuration
ckan.cors.origin_allow_all = True
If not, it is usually possible to force it at the web server level
(http://enable-cors.org/server_apache.html). CORS does not require the
API to do anything, it's mainly a HTTP header.
Stéphane
On 2015-10-07 11:55, Denis Zgonjanin wrote:
> Right, that works assuming you're using it on the same CKAN site, or
> server-side. I don't know what change caused the JSONP to break, but
> it might be worth opening an issue on https://github.com/ckan/ckan to
> track this. I agree that jsonp is a nice thing to have.
>
> On Wed, Oct 7, 2015 at 11:52 AM, Brown, Mathew GCPE:EX
> <Mathew.Brown at gov.bc.ca <mailto:Mathew.Brown at gov.bc.ca>> wrote:
>
>
> But then I get a CORS error, which I’m guessing is why the API
> uses JSONP. There must have been some change, perhaps to the ckan
> core, which doesn’t allow this anymore. A url has been setup up
> here that is CORS enabled so I’m okay, but I think this will be a
> problem for anyone using the resource JSONP code snippet.
>
>
> Mathew
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org <mailto:ckan-dev at lists.okfn.org>
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20151007/67a0a116/attachment-0003.html>
More information about the ckan-dev
mailing list