mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 08:56:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			615 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			615 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /**
 | |
|  * We'll load the axios HTTP library which allows us to easily issue requests
 | |
|  * to our Laravel back-end. This library automatically handles sending the
 | |
|  * CSRF token as a header based on the value of the "XSRF" token cookie.
 | |
|  */
 | |
| 
 | |
| let axios = require('axios');
 | |
| axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
 | |
| axios.defaults.headers.common['Accept'] = 'application/json';
 | |
| 
 | |
| if (typeof phpdebugbar !== 'undefined') {
 | |
|     axios.interceptors.response.use(function (response) {
 | |
|         phpdebugbar.ajaxHandler.handle(response.request);
 | |
| 
 | |
|         return response;
 | |
|     });
 | |
| }
 | |
| 
 | |
| export default axios;
 | 
