[ckan-dev] ...not allowed by Access-Control-Allow-Origin, even though resource_proxy is enabled.

Adrià Mercader adria.mercader at okfn.org
Fri Aug 9 09:44:57 UTC 2013


Hi Henrik,

Ignore the Access-Control-Allow-Origin error, this is caused because
the way the GeoJSON preview is implemented it tries to do a CORS
request first before trying the resource proxy. See eg
http://demo.ckan.org/dataset/test-ntest/resource/bccc8d4e-e8bc-4248-91ff-63ba1528d1d4
where you also get the error but the file is loaded fine.

I suspect there is a problem on the proxying itself. Does this happen
on large GeoJSON files or on all of them?

Next versions of CKAN due on Tuesday (2.0.2 and 2.1) add support for
streaming on the resource proxy [1], perhaps that will help although
I'm not entirely familiar with this part of the code, Dominik may know
more about it.

You could also try to increase the timeout limit on nginx.

Hope this helps,

Adrià

p.d. Great site btw!

[1] https://github.com/okfn/ckan/pull/989

On 8 August 2013 07:45, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
> I get the following error:
>
>
>
> XMLHttpRequest cannot load
> http://wfs-kbhkort.kk.dk/k101/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=k101:groenne_cykelruter&outputFormat=json&SRSNAME=EPSG:4326.
> Origin http://data.kk.dk is not allowed by Access-Control-Allow-Origin.
>
>
>
> Even though resource_proxy is enabled, which results in gateway timeout
> (hopefully).
>
>
>
> The site is on
> http://data.kk.dk/dataset/gronne-cykelruter/resource/8d64d2e0-00d1-4ff4-a36d-4f0a34949576
>
>
>
> Can anyone help me out on how to solve the issue?
>
>
>
> This is the error-log:
>
> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] mod_wsgi (pid=1669):
> Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
>
> [Thu Aug 08 08:44:38 2013] [error] [client 127.0.0.1] IOError: failed to
> write data
>
> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,254 INFO
> [ckan.lib.base]  /api/i18n/da render time 0.027 seconds
>
> [Thu Aug 08 08:44:38 2013] [error] 2013-08-08 08:44:38,401 INFO
> [ckanext.resourceproxy.controller] Proxify resource
> 8d64d2e0-00d1-4ff4-a36d-4f0a34949576
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list