Include CSRF token in remote:true calls

上级 651836a4
......@@ -31,7 +31,12 @@
} else {
method = element.attr('data-method');
url = element.attr('href');
data = null;
csrf_token = $('meta[name=csrf-token]').attr('content');
csrf_param = $('meta[name=csrf-param]').attr('content');
data = {};
data[csrf_param] = csrf_token;
}
$.ajax({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册