CSRF protection

This commit is contained in:
andryyy committed 2017-05-15 11:37:12 +02:00
1 parent fccdabb113
commit e91c6916ab
6 files changed
+37 -23

No files matched your search

+2 -2
View File
@@ -43,7 +43,7 @@ $(document).ready(function() {
$.ajax({
type: "POST",
dataType: "json",
data: { "items": JSON.stringify(data_array), "attr": JSON.stringify(api_attr) },
data: { "items": JSON.stringify(data_array), "attr": JSON.stringify(api_attr), "csrf_token": csrf_token },
url: '/api/v1/' + api_url,
jsonp: false,
complete: function (data) {
@@ -76,7 +76,7 @@ $(document).ready(function() {
$.ajax({
type: "POST",
dataType: "json",
data: { "items": JSON.stringify(data_array) },
data: { "items": JSON.stringify(data_array), "csrf_token": csrf_token },
url: '/api/v1/' + api_url,
jsonp: false,
complete: function (data) {