An ArchivesSpace plugin that adds Access-Control-Allow headers to HTTP requests using Rack middleware. Huge thanks to Mark Triggs for the assist on this code.
- ArchivesSpace instance
-
Download or clone this repository into the ArchivesSpace
plugins/
directory..git clone [email protected]:RockefellerArchiveCenter/as-cors.git
-
Edit
config/config.rb
to include the plugin:AppConfig[:plugins] = ['local', 'lcnaf', 'aspace-public-formats', 'as-cors']
-
Restart ArchivesSpace.
Routes on which CORS headers are available can be edited by changing the CORS_ENDPOINTS
variable. For production use, headers["Access-Control-Allow-Origin"]
should specify a host name, rather than the permissive wildcard *
.
Pull requests accepted!
- Mark Triggs
- Hillel Arnold
This code is released under the MIT License. See LICENSE.md
for more information.