jQuery.ajax向けのCSRF Token設定を削除
This commit is contained in:
parent
7c32ab068d
commit
1482c33448
@ -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';
|
||||||
|
Loading…
Reference in New Issue
Block a user