Add consistent CSRF token verification to API endpoints; address security concern with non-CSRF protected endpoints
This commit is contained in:
parent
cc31a0a6d0
commit
bf9cbe2c6d
7 changed files with 59 additions and 14 deletions
|
@ -145,9 +145,9 @@
|
|||
showLoaderOnConfirm: true
|
||||
}, function () {
|
||||
$.ajax({
|
||||
method: 'GET',
|
||||
method: 'POST',
|
||||
url: '/admin/settings/mail/test',
|
||||
headers: { 'X-CSRF-Token': $('input[name="_token"]').val() }
|
||||
headers: { 'X-CSRF-TOKEN': $('input[name="_token"]').val() }
|
||||
}).fail(function (jqXHR) {
|
||||
showErrorDialog(jqXHR, 'test');
|
||||
}).done(function () {
|
||||
|
|
Reference in a new issue