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

Changing the base URI for the image api #36

Open
glenrobson opened this issue Feb 8, 2018 · 6 comments
Open

Changing the base URI for the image api #36

glenrobson opened this issue Feb 8, 2018 · 6 comments

Comments

@glenrobson
Copy link
Contributor

I've deployed this as the image reference implementation but when you get the info.json the @id of the image starts with http://resync.library.cornell.edu/iiif_auth_test. Is there a way to set this either as part of the deployment or as a parameter? You can see an example of this by going to:

http://iiif.io/api/image/2.1/example/reference/detail/info.json

Ideally this would be either:

I see the comment in the code about taking it from the WSGI but that won't work in this case as its running from image-api.iiif.io and proxied through the iiif.io website. Unless I can set a variable in the WSGI config file.

For info this is the docker build file:

https://github.com/IIIF/docker-image-api-reference/blob/master/Dockerfile

@zimeon
Copy link
Owner

zimeon commented Feb 9, 2018

Hmmm... the WSGI support was a bit of a hack that I got going as a test and never really sorted out. I agree that there needs to be a way to do sensible config.

@zimeon
Copy link
Owner

zimeon commented Nov 9, 2019

https://iiif.io/api/image/2.1/example/reference/detail/info.json now shows

"@id": "http://iiif.io/api/image/2.1/example/reference/detail",

and https://iiif.io/api/image/3.0/example/reference/detail/info.json shows

"id": "http://iiif.io/api/image/3.0/example/reference/detail",

which look good. Not sure whether there is still something to do here.

@glenrobson
Copy link
Contributor Author

Yes this works great. Just because it took me a while to find out how this worked. The file path

/api/image/[1-3].[0-1]/example/reference/[file_name]/info.json

is fixed in:

handler_config.prefix = "api/image/%s/example/reference" % (api_version)

Which is fine for my uses. The thing I needed to change was the hostname and I believe you updated the following:

# file `iiif_reference_server.cfg` in base_dir for configuration

to take a config file where I could set this. Which I have done in the following config:

https://github.com/IIIF/docker-image-api-reference/blob/master/iiif_reference_server.cfg

So I think this is done and can be closed.

@glenrobson
Copy link
Contributor Author

@glenrobson
Copy link
Contributor Author

Ideally I would also set this in the config:

https://github.com/IIIF/docker-image-api-reference/blob/master/iiif_reference_server.cfg

@glenrobson
Copy link
Contributor Author

Is it set here:

uri = "http://" + host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants