I'm using AJAX post request and sending with CSRF-TOKEN - on my local server worked well, but on my IIS SERV TokenMismatchException in VerifyCsrfToken.php line 67:
This is the code:
$.ajax({
url : '{{ route('dashboard.ajax.update') }}',
method : 'POST',
data : {
table : 'categories',
data : {
order: $count
},
conditions : {
id: $id
}
},
dataType: 'JSON',
headers : {
"X-CSRF-TOKEN": '{{ csrf_token() }}'
}
});
In the console I can see the request with: X-CSRF-TOKEN:w3liodqf8bdOvWH9uVTzLHVVsE0L1uIlCpnOyVVS
What can cause this problem?