-
Notifications
You must be signed in to change notification settings - Fork 291
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
CORS #43
Comments
I think you rather want to proxy that API call through express @tadwhitaker . It is Yelp not having the necessary headers to you can not do much about that. But Node can be a proxy handling the request. So: var request = require('request');
app.get('/yelp', function (req, res) {
request('/api.yelp.com....', function (error, response) {
res.send(response.body); // Check request API, do not remember this
})
}); |
Can any-body advice me the way of handling server changes, with no rerun the server manualy, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to make a call to the Yelp API, but keep getting the following error:
XMLHttpRequest cannot load https://api.yelp.com/v2/search?term=food&location=new%20york. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 400.
Any suggestions on how to work around this?
The text was updated successfully, but these errors were encountered: