-
-
Notifications
You must be signed in to change notification settings - Fork 597
Closed
Description
I using Parse-SDK-JS on node and i get the following error when trying to query the database.
Here the code:
var Parse = require('parse/node').Parse;
Parse.initialize(cnf.parseServer.appId);
Parse.serverURL = 'http://xxx/parse';
//Then I tried to query the database
app.get('/', function (req, res) {
var query = new Parse.Query(Parse.User);
query.find().then(users => {
console.log(users.length);
res.send('Hello World!');
}, err => {
console.log(err);
res.send('Error World!');
});
});
But i get this error:
ParseError {
code: 107,
message: 'Received an error with invalid JSON from Parse: <html>\r\n<head><title>403 Forbidden</title></head>\r\n<body bgcolor="white">\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n' }
Note that my server need a Basic authentication to connect.
When calling the REST API from the client it works just fine (proably because the basic authentication are saved into the browser cookies).
So my question is: there is a way to set the Basic authentication the parse library?
Metadata
Metadata
Assignees
Labels
No labels