fix missing csrf tokens for some ajax requests
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -15,6 +15,9 @@ export default function () {
|
||||
ip: ipval
|
||||
},
|
||||
dataType: "json",
|
||||
beforeSend: function (request) {
|
||||
request.setRequestHeader('X-CSRF-TOKEN', document.querySelector('meta[name="csrf-token"]').getAttribute('content'));
|
||||
},
|
||||
success: function (json) {
|
||||
if (json != 0) {
|
||||
$('#ip').addClass('is-invalid');
|
||||
|
||||
Reference in New Issue
Block a user