jQuery.ajax向けのCSRF Token設定を削除

This commit is contained in:
shibafu 2020-08-06 21:31:59 +09:00
parent 7c32ab068d
commit 1482c33448

View File

@ -1,17 +1,5 @@
// jQuery // jQuery
import './tissue'; import './tissue';
// Setup global request header
const token = document.head.querySelector<HTMLMetaElement>('meta[name="csrf-token"]');
if (!token) {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
} else {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': token.content,
},
});
}
// Bootstrap // Bootstrap
import 'bootstrap'; import 'bootstrap';