samvera / serverless-iiif

IIIF Image API 2.1 & 3.0 server in an AWS Serverless Application
https://samvera.github.io/serverless-iiif/
Apache License 2.0
69 stars 21 forks source link

Move CORS settings from template to code #107

Closed mbklein closed 1 year ago

mbklein commented 1 year ago

Because so many IIIF consumers (e.g., Clover, OpenSeadragon) have the option of using XHR with credentials: true, we need more fine-grained control over the CORS response headers (specifically Access-Control-Allow-Credentials and Access-Control-Allow-Origin. This PR moves the responsibility for those headers from the SAM template / Lambda Function configuration to the code itself. See the README changes for details.

Resolves #104