How to execute query on Stardog database using through react app using Kerberos authentication?

Hi Stardog team,

I am trying to execute a query on a Stardog database running on server http://xyz.com:0000 . System has Kerberos authentication so I leave the username and password emtpy strings. While making the connection. I am using :

const conn = new Connection({
username: '',
password: '',
endpoint: 'http://xyz.com:0000',
});

query.execute(conn, 'myDatabaseName', 'select distinct ?s where { ?s ?p ?o }', 'application/sparql-results+json', {
limit: 10,
reasoning: true,
offset: 0,
}).then(({ body }) => {
console.log(body.results.bindings);
});

But the query is not taking place. Do I have to add anything so that Stardog query knows its a Kerberos Authentication.

The error I am getting in console is:

Access to fetch at http://xyz.com:0000 from origin localhost:3000 has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.