0
我試圖訪問一個不同的域名網站這樣: http://jsfiddle.net/carolineBda/2uZnP/AngularJS CORS訪問控制允許來源的錯誤
我總是得到(錯誤可見在控制檯):
XMLHttpRequest cannot load http://www.google.fr.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://fiddle.jshell.net' is therefore not allowed access.
我已經配置httpProvider這樣的:
app.config(['$httpProvider',function ($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}]);
任何想法我失蹤? 感謝您的幫助。