diff --git a/src/resources/views/partials/token_handler.blade.php b/src/resources/views/partials/token_handler.blade.php index 77210d4f..0f2edb82 100644 --- a/src/resources/views/partials/token_handler.blade.php +++ b/src/resources/views/partials/token_handler.blade.php @@ -31,6 +31,15 @@ window.jQuery.ajaxSettings.headers = { 'Authorization': bearer }; } } + + if (window.Livewire) { + // livewire + window.livewire.addHeaders({ + 'Authorization': bearer, + 'content-type': 'application/json', + 'X-Requested-With': 'XMLHttpRequest' + }); + } if (window.axios) { // Axios