Enabling Cross-Origin Resource Sharing (CORS) on a Virtuoso SPARQL Endpoint
What is CORS?
CORS enables conventional client-server interactions over a Web of data sources, with embedded elements from multiple sources presented by a single page. Basically, CORS helps traverse the Web from a single original data source.
Why enable CORS?
Enabling a Virtuoso SPARQL Endpoint to serve the Data Access needs of user agents (e.g., Javascript clients) that are programmed to leverage CORS.
How can I enable CORS?
You CORS enable a Virtuoso SPARQL endpoint via the following steps:
- Go to the HTML-based Instance Admin UI (Conductor) at
http://{your-instance-hostname}:[port]/conductor
. - Enter dba credentials.
- Go to Web Application Server → Virtual Domains & Directories:
- Expand Interface for the Default Web Site:
- Locate the
/sparql
Logical Path:
- Click Edit:
- Enter, for example,
*
in the Cross-Origin Resource Sharing input field. Optionally you can check the Reject Unintended CORS check-box:
- Click Save Changes.
Related
- Virtuoso Tips and Tricks Collection
- Setting up server-side Cross-Origin Resource Sharing (CORS) with Virtuoso
- Third-party guide to enabling Cross-Origin Resource Sharing with various servers