CSRF_HEADER_NAME
- Get CSRF_HEADER_NAME from settings to pass to jquery.django-csrf.html template - Version bump to 2.1.10 - Update readme
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
crossDomain: false, // obviates need for sameOrigin test
|
||||
beforeSend: function(xhr, settings) {
|
||||
if (!csrfSafeMethod(settings.type)) {
|
||||
xhr.setRequestHeader("X-CSRFToken", csrftoken);
|
||||
xhr.setRequestHeader("{{ csrf_header_name }}", csrftoken);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user