I'm using Jeditable and jQuery (obviously) and I need to send X-CSRF-Token in every Ajax request. How can I do it?
Jeditable does not seem to support this issue. (or am I wrong?)
I'm using Jeditable and jQuery (obviously) and I need to send X-CSRF-Token in every Ajax request. How can I do it?
Jeditable does not seem to support this issue. (or am I wrong?)
My simple solution is to make JQuery include my X-CSRF-Token in every Ajax request. Just add:
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': getCookie('myCsrfToken')
}
});
See here for proper 'getCookie' function.