%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}%
---+ 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:
1 Go to the HTML-based Instance Admin UI (Conductor) at http://{your-instance-hostname}:[port]/conductor
.
1 Enter dba credentials.
1 Go to Web Application Server → Virtual Domains & Directories:
%BR%%BR%%BR%%BR%
1 Expand Interface for the Default Web Site:
%BR%%BR%%BR%%BR%
1 Locate the /sparql
Logical Path:
%BR%%BR%%BR%%BR%
1 Click Edit:
%BR%%BR%
%BR%%BR%%BR%
1 Enter, for example, *
in the Cross-Origin Resource Sharing input field. Optionally you can check the Reject Unintended CORS check-box:
%BR%%BR%%BR%%BR%
1 Click Save Changes.
---++Related
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[VirtTipsAndTricksGuideCORSSetup][Setting up server-side Cross-Origin Resource Sharing (CORS) with Virtuoso]]
* [[http://enable-cors.org/][Third-party guide to enabling Cross-Origin Resource Sharing with various servers]]