Error 419 (unknown status) in POST request with Ajax

0

According to what I have read, I have a security problem with the token.

I try placing this:

$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});

In my header I find this:

<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">

This gives me the following error:

Is there any way to verify that the token is loading properly?

    
asked by Pablo Contreras 02.12.2018 в 01:31
source

0 answers