mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-21 15:53:45 +02:00
Use the client API to load servers on the listing page
This commit is contained in:
8
resources/assets/scripts/bootstrap.js
vendored
8
resources/assets/scripts/bootstrap.js
vendored
@@ -21,6 +21,14 @@ window.axios = require('axios');
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
window.axios.defaults.headers.common['Authorization'] = 'Bearer ' + localStorage.token || '';
|
||||
|
||||
if (typeof phpdebugbar !== 'undefined') {
|
||||
window.axios.interceptors.response.use(function (response) {
|
||||
phpdebugbar.ajaxHandler.handle(response.request);
|
||||
|
||||
return response;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Next we will register the CSRF Token as a common header with Axios so that
|
||||
* all outgoing HTTP requests automatically have it attached. This is just
|
||||
|
||||
Reference in New Issue
Block a user