11 lines
287 B
11 lines
287 B
7 months ago
|
$(document).ready(function () {
|
||
|
$.ajaxSetup({
|
||
|
beforeSend: function (xhr, settings) {
|
||
|
if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type) && !this.crossDomain) {
|
||
|
xhr.setRequestHeader("X-CSRFToken", csrftoken)
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
});
|
||
|
|