[ckan-dev] Question: Proxying files in CKAN

Toby Dacre toby.okfn at gmail.com
Fri Sep 21 10:55:36 UTC 2012


On 21 September 2012 11:45, Dominik Moritz <domoritz at gmail.com> wrote:

> Hello all,
>
> Toby and me added a pdf preview for ckan based on pdf.js. Unfortunately,
> because of cross domain issues it is not possible to preview files from a
> different domain. We could add a simple proxy that serves the files. Our
> question is what implications that could have for ckan.
>
> The ide is to have a proxy only for resources. So a request to:
> /fileproxy/{resource-id} would server the file. It should not be a general
> proxy because of security issues.
>
> Are there serious issues with this approach?
>
>
To widen the discussion a little

the options appear to be

1) drop the viewer
2) only view local files (seems odd to the user that we can see some not
others)
3) have a proxy to reserve the pdf from same domain to avoid the problem
4) try to `cache` a local copy of the pdf (are there license issues)

if we decide on 3

we then get the issues

a) as part of ckan is this turned on by default or a plugin so availability
is an instance level choice (we could check the resource `exists` in ckan
b) is it externally done via apache/nginx (is this then just an open proxy
to be abused)
c) what dangers are there in it for us/clients as the runners of such a
proxy

personally I'd prefer to look at the 4 option but what do others think?

Toby

Cheers,
> Dominik
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120921/21cd566e/attachment-0001.html>


More information about the ckan-dev mailing list