I have node service that runs on locahost and i am calling this service in HTML standalone page using ajax GET method. But this gives me no access control allow origin error please help
Asked
Active
Viewed 35 times
1 Answers
1
This question has already partially been answered here
If you Did write the API yourself, please add the following header to your API:
NodeJS:
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
});
More detailed information can be find in the stack overflow question that has already been answered.

Kevin Vugts
- 1,462
- 4
- 21
- 39