T
T
Troodi Larson2020-02-20 11:41:44
Laravel
Troodi Larson, 2020-02-20 11:41:44

CSRF token not found?

In the meta is:

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

Through the console I can manually get what is in the meta. But still writes that: CSRF token not found - app.js.
What the? There seems to be a token in the meta, but in fact, does it swear that it doesn’t exist?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Kulaxyz, 2020-02-20
@Kulaxyz

Add to request

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question