mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Fixed CSRF on create asset ajax
This commit is contained in:
parent
15bab7fa9e
commit
73d45e9a14
|
@ -191,6 +191,10 @@
|
|||
$(".status_spinner").css("display", "inline");
|
||||
$.ajax({
|
||||
url: "{{url('/') }}/api/v1/statuslabels/" + status_id + "/deployable",
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function (data) {
|
||||
$(".status_spinner").css("display", "none");
|
||||
|
||||
|
@ -358,7 +362,10 @@
|
|||
$.ajax({
|
||||
type: 'POST',
|
||||
url: form.action,
|
||||
headers: {"X-Requested-With": 'XMLHttpRequest'},
|
||||
headers: {
|
||||
"X-Requested-With": 'XMLHttpRequest',
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
|
|
Loading…
Reference in a new issue