Skip to content

Instantly share code, notes, and snippets.

@hemanth
Created February 7, 2014 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hemanth/8858314 to your computer and use it in GitHub Desktop.
Save hemanth/8858314 to your computer and use it in GitHub Desktop.
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'];
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment