CORS with AngularJS
var myApp = angular.module('myApp', []);
myApp.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}
]);
Written by hemanth
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Web
Authors
johnbender
77.79K
hector
56.26K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#