MIF_E31221305/TA_website/resources/js/config.js

23 lines
515 B
JavaScript

/**
* Base URL configuration
*
* Note: These values are loaded from the server when the page loads.
* See the <script> tag in the HTML head.
*/
// Get base URL from the global window object, which is set in app.blade.php
const baseURL = window.BASE_URL || '';
/**
* API configuration
*/
const api = {
baseURL: `${baseURL}/api`,
timeout: 30000, // 30 seconds
headers: {
'Content-Type': 'application/json',
'X-Requested-With': 'XMLHttpRequest'
}
};
export { baseURL, api };