[ckan-dev] PDF Preview not working with Alternative DNS

Michael Speth spethm at landcareresearch.co.nz
Wed May 14 22:55:58 UTC 2014


The resource_proxy is enabled on the site.  However, I don't think the resource proxy is the solution because its addressing a different issue.

Consider this statement:
 This extension gets around the same origin policy by pretending that all files are served from the same domain (same origin) that CKAN is on

The origin in this case ckan.zen.  But the browser sees datastore so disallows pdfpreview.  IE, datastore resolves to ckan.zen (through the network with NAT and such).  CKAN will be reporting based on ckan.zen but the user needs it to report as datastore according to the resource_proxy extension.

Any ideas of how to address this problem?



On Wed, May 14, 2014 at 11:34 AM, Michael Speth <spethm at landcareresearch.co.nz<mailto:spethm at landcareresearch.co.nz>> wrote:
Greetings,
  A production instance of CKAN has 2 URLs.  The primary URL is specified in the production.ini for the site url: ckan.site_url = http://ckan.zen.landcareresearch.co.nz

The other is http://datastore.landcareresearch.co.nz/ which redirects to ckan.zen (but maintaines the datastore url).

The preview function doesn't work on PDFs when using the alternative URL but the primary URL does work.

Alternative URL Example
http://datastore.landcareresearch.co.nz/dataset/post-89-plantation-forest-soils/resource/31507031-cd7c-47d3-b713-9c0771f9f5ef

Primary URL which works
http://ckan.zen.landcareresearch.co.nz/dataset/post-89-plantation-forest-soils/resource/31507031-cd7c-47d3-b713-9c0771f9f5ef

Another thing to note, is that the direct download link for the PDF works on the Alternative URL.

Any ideas of what might be causing the issue?

--
Michael Speth
DevOps Computer Engineer
Landcare Research Consultant



--
Michael Speth
DevOps Computer Engineer
Landcare Research Consultant

________________________________

Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140515/3f147f7f/attachment-0003.html>


More information about the ckan-dev mailing list