Skip to content

Instantly share code, notes, and snippets.

@kevinblanco
Created September 29, 2014 06:00
Show Gist options
  • Save kevinblanco/92682d3caf1ad550dac0 to your computer and use it in GitHub Desktop.
Save kevinblanco/92682d3caf1ad550dac0 to your computer and use it in GitHub Desktop.
app.config(function($httpProvider) {
//Enable cross domain calls
$httpProvider.defaults.useXDomain = true;
//Remove the header used to identify ajax call that would prevent CORS from working
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