Hi list,
I would like to make a general announcement about a technical topic that seems to be misunderstood by many institutions that are supporting IIIF image servers. Actually supporting the CORS protocol (per the
Fetch specification) requires an image server or proxy to handle the OPTIONS method. Frequently, providers will simply add the "Access-Control-Allow-Origin" header to the default response configuration, but this is not sufficient.
There are new browser APIs like
Service Workers that depend on CORS working correctly.
Adding OPTIONS support to Apache is as simple as:
AllowMethods GET HEAD OPTIONS
Unfortunately, most of the guides on CORS for Apache omit this essential detail. The server needs to accept an OPTIONS request and not just provide CORS headers.
You can test if your server supports OPTIONS with cURL:
The response should just provide the headers and not a body.
And for those of you who are supporting image servers and CORS with the OPTIONS method correctly, congratulations!
Christopher Johnson
Scientific Associate
Universitätsbibliothek Leipzig