Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loris doesn't respect the proxy_path setting when creating the Link header #359

Closed
alexwlchan opened this issue Sep 22, 2017 · 1 comment

Comments

@alexwlchan
Copy link
Contributor

We run Loris with the following setting:

[loris.Loris]
proxy_path = 'https://iiif.wellcomecollection.org/image/'

The proxy_path setting is used to create correct URLs in the info.json, for example:

$ curl 'https://iiif.wellcomecollection.org/image/s3%3AV0000000%2FV0000003.jpg/info.json' 2>/dev/null | jq -r '.["@id"]'
https://iiif.wellcomecollection.org/image/s3%3AV0000000%2FV0000003.jpg

But if you request an image file, the Link header is still poking through the origin URL (which in our case, leads to a 404):

$ curl -o /dev/null -D - 'https://iiif.wellcomecollection.org/image/s3%3AV0000000%2FV0000003.jpg/full/full/0/default.jpg' 2>/dev/null | grep Link
Link: <http://iiif.io/api/image/2/level2.json>;rel="profile",<http://iiif-origin.wellcomecollection.org/s3%3AV0000000%2FV0000003.jpg/full/full/0/default.jpg>;rel="canonical"

Loris should use the proxy_path setting, and rewrite this URL to the following:

http://iiif.wellcomecollection.org/image/s3%3AV0000000%2FV0000003.jpg/full/full/0/default.jpg

We’re seeing this while running with commit df047b4.

@alexwlchan alexwlchan added this to the Loris 2.3.0 milestone Oct 18, 2017
bcail added a commit that referenced this issue Jan 30, 2018
* if defined, use proxy_path for canonical link (issue #359)

* add test for canonical link when proxy_path isn't set
@bcail
Copy link
Contributor

bcail commented Jan 30, 2018

Fixed in #395.

@bcail bcail closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants