-
-
Save Yogendra0Sharma/42870b90e3b7c446b4c04083b1c2960a to your computer and use it in GitHub Desktop.
ANGULARJS - Django CSRF Token header setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myApp = angular.module('myApp').config(function($httpProvider) { | |
$httpProvider.defaults.headers.post['X-CSRFToken'] = $('input[name=csrfmiddlewaretoken]').val(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment