Skip to content

Cross-origin issue on /classes? #408

Closed
@vbabaria

Description

@vbabaria

get following error...

"XMLHttpRequest cannot load http://localhost:1337/parse/classes/Generic. Request header field X-Parse-Application-Id is not allowed by Access-Control-Allow-Headers in preflight response."

using below simple restful call fails connecting to parse-server and same code works via parse.com (commented out line below)

any help would be really appreciated - thanks

$.ajax({
type: "GET",
//url: "https://api.parse.com/1/classes/Generic", // works
url: "http://localhost:1337/parse/classes/Generic", // fails
data: "",
contentType: "application/json",
headers: {
"Content-Type": "application/json",
"X-Parse-Application-Id":"app key",
"X-Parse-REST-API-Key":"rest api key"
},
success: function(data){
console.log(data);
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions