Good afternoon, I'm trying to make a client that indexes the information of several webservices (about bitcoin quotes from several brokers), but when trying to access the webservice the imported json values are not displayed, and pressing F12 in chrome returns the following error message:
XMLHttpRequest can not load link . In 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' link ' is therefore not allowed access.
I have already researched the error, the same also happens on my remote test server (hostinger), I know the error occurs because the server does not return the header "Access-Control-Allow-Origin = *" are many different third party servers that I will fetch and all return this same error to me ...
follows the code used to access WS: (service)
app.factory('foxbit', ['$http',
function($http){
return $http.get('https://api.blinktrade.com/api/v1/BRL/ticker?crypto_currency=BTC')
.success(function(data) {
return data;
})
.error(function(err) {
return err;
});
}]);
Controller:
app.controller('MainController', ['$scope', 'foxbit', function($scope, foxbit) {
foxbit.success(function(data) {
$scope.cotacaofox = data;
});
}]);
So if the ninjas here can point me to a way around this error, I'll be very grateful.
Thank you.