I am using nodejs as backend and angularjs.
In my front end app, I neeed to read a feed at 'http://feeds.folha.uol.com.br/folha/ciencia/rss091.xml'.
I am getting an error of access-control-origin.
I don´t understand, because if I use the Postman app with this url or type right into browser no-error happens.
What am I doing wrong?
in my controller I am using:
app.controller('OpenWeatherCtrl', ['$scope','$http',
function($scope,$http) {
$http.get('http://feeds.folha.uol.com.br/folha/ciencia/rss091.xml')
.then(function(data) {
if (data && data.length >0 ) {
$scope.news = data;
}
});
But I get the next error:
XMLHttpRequest cannot load http://feeds.folha.uol.com.br/folha/ciencia/rss091.xml.
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.