Hi,

have you configured ArangoDB to trust the origin your browser is sending 
the request from?

https://docs.arangodb.com/devel/HTTP/General/#cross-origin-resource-sharing-cors-requests

You need to set the `http.trusted-origin` option to either the hostnames 
(including ports) from which you are trying to access or the special 
wildcard "*" to allow requests from any origin.

ArangoDB will only respond with a value of "true" if the origin is trusted.

We've adjusted the documentation for the upcoming 3.2 release to make this 
more explicit.

Cheers,

Alan

On Monday, 3 April 2017 07:36:43 UTC+2, Tshitshi kia ntoni wrote:
>
> Hi everyone.
>
> Can anyone help me understand and resolve the following issue
>
>
> Thx.
>
>
> Error
> ------
> XMLHttpRequest cannot load 
> http://localhost:8529/_db/mydb/_api/database/current. Response to 
> preflight request doesn't pass access control check: The value of the 
> 'Access-Control-Allow-Credentials' header in the response is 'false' which 
> must be 'true' when the request's credentials mode is 'include'. Origin '
> http://127.0.0.1:8080' is therefore not allowed access. The credentials 
> mode of requests initiated by the XMLHttpRequest is controlled by the 
> withCredentials attribute.
>
> JS
> ---
> let db = arangojs(`http://localhost:8529`);
> db.useDatabase('mydb');
> db.useBasicAuth('usr','pwd');
> db.get()
> .then(info => {
>     // the database exists
>     console.info(JSON.stringify(info));
> });
>
> Html
> ------
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <meta charset="utf-8">
> <title>title</title>
> <script src="arangojs.min.js"></script>
> <script src="arango-test.js"></script>
> </head>
> <body>
> <h1>header</h1>
> <p>
> </p>
> </body>
> </html>
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to