Support subdomains
Refs https://redmine.teklia.com/issues/5470
This MR allows a IIIF API user to request the same image hosted on a S3 bucket through 2 urls:
- with the bucket name as first folder on the IIIF identifier path (as currently implemented on master)
- with the bucket name as subdomain
Example: for a given image nice.jpg
hosted on the bucket test
, where the server runs as localhost:8000
, both urls will be valid:
http://localhost:8000/iiif/2/test%2Fnice.jpg/info.json
http://test.localhost:8000/iiif/2/nice.jpg/info.json
To test this, you need to have gradle
setup on your computer and a local copy of cantaloupr-5.0.5.jar
as mentionned on the README, then run make
. This will compile the extension, and bring up a docker stack with cantaloupe+extension & minio.
You can create a bucket on http://localhost:9001 (creds minio1234
/ minio1234
), add an image, then play with urls.
To change the known top domain, edit the configuration in cantaloupe.properties
: S3Source.top_domain
.
Edited by Bastien Abadie