-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource #20
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
Comments
Had the same issue and got it fixed! Here is the code I placed right after the "api" variable in the index.js file:
It's not final, just got me thru to be able to make calls from JS app |
Strange, because we enable this already here: https://github.com/ParsePlatform/parse-server/blob/master/index.js#L90 |
@rudymacias hmm thanks.. not sure why its just not working like suggested above.. just so you know, I set up a heroku parse server with the parse server example, connected to MongoLab. @gfosco I just tried this again with a fresh install of the parse server example on Heroku + MongoLabs.. ran the code and got the same result.. any thoughts or how I could help debug this? from the Heroku deployment.. remote: -----> Build succeeded! |
Ahhhh... In the screenshot above, the path is missing.. xxx.herokuapp.com/parse (or whatever your mount point is.. defaults to /parse. |
Ok adding this code worked.. Now just getting a 404.. not sure whats up, do I need to populate some basic database collections in mongoLab first? |
Nice! Yeah right you probably need data in the Database. At least a class setup. But after data is there, I haven't had any problem making requests to find/create. |
See my comment above, you don't need data, but you do need to provide the right path as the serverURL. |
Yea, I just posted on a similar issue , might be worth updating docs.. i know its silly but could keep questions like this from cropping up.. thank you.. |
on the route you put in Parse.serverURL add / parse to avoid that mistake |
http://srjlove.iran-rank.ir/wc-api/v3/products/categories?oauth_consumer_ke…version=1.0&oauth_signature=zDbvUd5nkxqyDtTvvTwfPvjytNRWK9xLoZZvAlBDuI0%3D. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.0.101:8100' is therefore not allowed access. what is an error in this .config(function($stateProvider , $urlRouterProvider) $urlRouterProvider.otherwise('/app/home'); .controller('AppCtrl', function($scope, WC){ var Woocommerce = WC.WC(); Woocommerce.get('products/categories', function(err, data, res){
}) .controller('HomeCtrl',function(){ |
I have exact same problem as @gateway but no luck with this. I have website and parse-server on separate domains. Should it matter? |
|
How was this project tested without them getting the same errors? Since the dashboard and parse api are likely always going to be on different hosts and it's all browser based cors will always be an issue. |
but i still have the same issue after adding res.header('Access-Control-Allow-Origin', '*'); |
Not sure exactly what the issue is here, I have a Heroku server setup with mongolab db connected, the server is up and running but Im unable to save any data to the server since it spits out this in my console.
Here is the code im using on another server..
The text was updated successfully, but these errors were encountered: