Skip to content

Cross-origin issue on /classes? #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vbabaria opened this issue Feb 14, 2016 · 5 comments
Closed

Cross-origin issue on /classes? #408

vbabaria opened this issue Feb 14, 2016 · 5 comments
Labels
type:question Support or code-level question

Comments

@vbabaria
Copy link

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);
}
});

@omairvaiyani
Copy link
Contributor

I recall getting this error until we upgraded to 2.0.7. What are you on?

@vbabaria
Copy link
Author

thanks for the response - using v.2.0.8 of parse-server and still get this error

@gfosco
Copy link
Contributor

gfosco commented Feb 14, 2016

Can you try this with a bare copy of parse-server-example? The middlewares are set up to allow cross-origin on these paths, so I'm wondering if you've made a change or otherwise have something configured incorrectly.

@gfosco gfosco changed the title Error Request header field X-Parse-Application-Id is not allowed by Access-Control-Allow-Headers in preflight response via restful call Cross-origin issue on /classes? Feb 14, 2016
@vbabaria
Copy link
Author

thanks for the update and response

this issue seems to be related to parse-community/parse-server-example#53

@drew-gross
Copy link
Contributor

This issue is fixed in #390. If you don't want to wait for the next release, you can clone the repo and run the master branch.

@mtrezza mtrezza added type:question Support or code-level question and removed 🔧 troubleshooting labels Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

5 participants