Conal-Tuohy / PROV-Solr-API-Tools

Provides additional tools for working with PROV's Solr API
Apache License 2.0
1 stars 0 forks source link

Cross Origin Resource Sharing #1

Open Conal-Tuohy opened 2 years ago

Conal-Tuohy commented 2 years ago

In order that PROV’s API can be invoked by web browser code such as the Query Builder, Photo Wall, or other IIIF client software, the API server needs a small configuration change to enable Cross Origin Resource Sharing, by returning the appropriate CORS HTTP headers.

See https://en.wikipedia.org/wiki/Cross-origin_resource_sharing for details.

Conal-Tuohy commented 2 years ago

Note this will be needed by the photo-wall application, but it's also necessary for anyone who wants to call the existing PROV API from within a browser-based application.

asaletourneau commented 2 years ago

Request made to PROV TS today recorded as ticket ps://prov.freshservice.com/support/tickets/5761

Conal-Tuohy commented 2 years ago

NB since the API is accessed via a Kong gateway, CORS could be enabled for the API by configuring the gateway. The CORS plugin for Kong is documented here: https://docs.konghq.com/hub/kong-inc/cors/#main

NB the config.origins option should be set to the value * (as the Kong documentation describes) so that the API can be accessed from anywhere.

Incidentally, if the PROV IT person doing this configuration wants to ask me anything about it, feel free to pass my phone number and email on (or point them at this issue).

asaletourneau commented 2 years ago

Have passed on your number! Cheers

asaletourneau commented 2 years ago

Daniel Wilson back from leave and emailed this morning he will look at this soon.