Princeton-CDH / derrida-django

Derrida's Margins - Python/Django web application
https://derridas-margins.princeton.edu
Apache License 2.0
8 stars 1 forks source link

IIIF info json ID exposes PUL's IIIF endpoint #278

Closed kmcelwee closed 3 years ago

kmcelwee commented 3 years ago

Replace the IIIF @id with our proxy instead of https://iiif-cloud.princeton.edu/iiif/2/36%2F65%2Ff9%2F3665f9f50fab4dabb32e2dd3d1911cb5%2Fintermediate_file/info.json

Testing Notes

Test that links with the following endings don't show the PUL link on @id

kmcelwee commented 3 years ago

@rlskoeser ugh, I mean it resolves, but it's not even a properly formatted link 🙄 I feel like I shouldn't even mention it, but this shows the PUL link: https://test-derrida.cdh.princeton.edu/library/levi-strauss-la-pensee-sauvage-1962/gallery/images/p-169/iiif/info.json/

rlskoeser commented 3 years ago

I noticed this when I was implementing the fix but I didn't address it ... we have too many different versions of the info url that show the same content but the @id is different because it's based on the current url.

How did you end up on the version with the trailing slash, was it linked anywhere?

I think /iiif/, /iiif/info.json and /iiif/info.json/ all give the json response but have different urls. They should probably redirect to one canonical version — I guess info.json, since that's the closest to the IIIF image api spec

kmcelwee commented 3 years ago

@rlskoeser It wasn't linked anywhere, I just guessed that it would show the PUL version. Again, probably not worth it

kmcelwee commented 3 years ago

@rlskoeser The redirect makes this feel very clean, LGTM!!