Skip to content

HttpSource ScriptLookupStrategy - multiple http sources in single Cantaloupe? #452

Answered by adolski
stephenmcconnachie asked this question in Q&A
Discussion options

You must be logged in to vote

"HttpSource" is the name of a component inside Cantaloupe. It doesn't refer to "an HTTP source." The same HttpSource can access any number of HTTP sources/servers. There are two ways to make that work:

  1. Using BasicLookupStrategy, set HttpSource.BasicLookupStrategy.url_prefix to nothing and provide the encoded full source URL as the image identifier, for example: http://my-cantaloupe-server/iiif/2/http%3A%2F%2Fmy-images.org%2Fimage.jpg/info.json

  2. Using ScriptLookupStrategy, analyze the identifier in the httpsource_resource_info() method of your delegates.rb file. It can return any URL including different hosts for different identifiers.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@stephenmcconnachie
Comment options

@stephenmcconnachie
Comment options

@adolski
Comment options

Answer selected by adolski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants