ajax CORS trouble
2023-03-21
1 min read
how to handle?
before your scripts, set a variblevar token = "{{ csrf_token }}";,
then add headers: { 'X-CSRFTOKEN': ${token} }, in your ajax request
then code run well~👏