Ich erhalteWinkel- und Google Distanzmatrix keine Zugriffskontrolle Header
XMLHttpRequest nicht https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=bl79yt&destinations=cw73bz&key=mykey laden. Kein 'Access-Control-Allow-Origin'-Header ist auf der angeforderten -Ressource vorhanden.
In meiner eckigen App. Ich habe meine HTTP-Anfrage an die Google-Distanzmatrix wie folgt aus:
var url = 'https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=' + pcodefrom + '&destinations=' + pcodeto + '&key=mykeyhere';
console.log(url);
$http({method: 'GET', url: url,headers: {
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "SAMEORIGIN",
"X-Rack-CORS": "preflight-hit; no-origin"
}}).success(function(data) {
};
}).error(function(data){
});
Ive die URL der Website in der Google API-Konsole erlaubt, aber es funktioniert immer noch nicht.