angular.module('MyApp').config(function($httpProvider) {
$httpProvider.defaults.xsrfCookieName = 'csrftoken';
$httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
$httpProvider.defaults.headers
.common['X-Requested-With'] = 'XMLHttpRequest';
$httpProvider.defaults.headers
.post['Content-Type'] = 'application/x-www-form-urlencoded';
});
Created
March 12, 2016 06:01
-
-
Save qnub/81d7103d695ed4c957e6 to your computer and use it in GitHub Desktop.
Angular hints
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment