Commit c5a0c6b6 authored by alexandre's avatar alexandre

Fixing 403 csrf error?

parent 1a077a4a
Pipeline #149 failed with stages
......@@ -13,11 +13,11 @@ window.W = window.W || {};
Marionette.setRenderer(Marionette.TemplateCache.render);
var csrftoken = W.utils.getCookie('csrftoken');
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!W.utils.csrfSafeMethod(settings.type) && !this.crossDomain) {
var csrftoken = W.utils.getCookie('csrftoken');
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment