uoregon-libraries / rais-image-server

RAIS: A IIIF-compliant, 100% open source image server for blazing-fast deep zooming
Creative Commons Zero v1.0 Universal
78 stars 6 forks source link

Add an ID prefix mapping configuration / plugin option #21

Closed jechols closed 4 years ago

jechols commented 5 years ago

Use case: I don't want to expose internal information about my images. But I don't want to map every possible image ID to something opaque.

This won't look great as an ENV variable, but if we want it to be extremely easy to configure, it needs to be configurable in the environment. e.g.:

export RAIS_ID_MAPS="collection1-=s3:bucket1:||collection2-=s3:bucket2:"

This make any id starting with collection1- translate under the hood to s3:bucket1:, so that, e.g., collection1-giovanni.jp2 is what the public would see if inspecting the code, but s3:bucket1:giovanni.jp2 is what RAIS resolves.

jechols commented 4 years ago

Fixed in develop: https://github.com/uoregon-libraries/rais-image-server/blob/develop/rais-example.toml#L49