We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92f2737 commit 52d5224Copy full SHA for 52d5224
resources/js/controllers/html_load_controller.js
@@ -8,10 +8,6 @@ export default class extends ApplicationController {
8
initialize() {
9
this.axios();
10
this.csrf();
11
-
12
- document.addEventListener('turbo:load', () => {
13
- this.csrf();
14
- });
15
}
16
17
/**
@@ -40,11 +36,6 @@ export default class extends ApplicationController {
40
36
*/
41
37
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
42
38
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
43
44
- document.addEventListener("turbo:before-fetch-request", (event) => {
45
- event.detail.fetchOptions.headers["X-CSRF-TOKEN"] = token.content;
46
47
48
39
49
50
0 commit comments