ckan / ckanext-xloader

Express Loader - quickly load data into DataStore. A replacement for DataPusher.
GNU Affero General Public License v3.0
46 stars 52 forks source link

Allow to provide an alternative CKAN host #226

Open amercader opened 2 months ago

amercader commented 2 months ago

The xloader currently uses CKAN URLs for two things:

In any case, both these requests use the URL built with ckan.site_url, which is the public facing URL. This won't work on scenarios where the xloader has no access to it, for instance when running in a separate container in a docker compose setup. We need to introduce support for a new config option similar to ckan.datapusher.callback_url_base which will allow xloader to call e.g. http://ckan:5000/dataset/{id}/resource/{id}/download instead of https://myckan.site.org/dataset/{id}/resource/{id}/download

ThrawnCA commented 1 month ago

We need to introduce support for a new config option similar to ckan.datapusher.callback_url_base which will allow xloader to call e.g. http://ckan:5000/dataset/{id}/resource/{id}/download instead of https://myckan.site.org/dataset/{id}/resource/{id}/download

I'm a little confused about why the site_url would point to myckan.site.org if that URL doesn't work.

wardi commented 1 month ago

There can be network restrictions or reverse proxies that in prevent accessing "outside" resources from the web server.

A config option like this lets admins provide an alternate internal name/address that can be used to connect to ckan.

ThrawnCA commented 1 month ago

There can be network restrictions or reverse proxies that in prevent accessing "outside" resources from the web server.

Wouldn't that make the XLoader essentially unusable? I suppose it could still parse uploaded files, just not links.