Skip to content

Instantly share code, notes, and snippets.

@mikeerickson
mikeerickson / angular-node-cors.js
Last active December 25, 2015 00:29 — forked from dirkk0/gist:5967221
Allowing CORS with AngularJS and Node/Express
// in AngularJS (client)
myApp.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}]);
// in Express/nodeJS