mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 05:54:34 +02:00
Add support for custom base URL - resolve #114
This commit is contained in:
4
resources/js/api.js
vendored
4
resources/js/api.js
vendored
@ -8,6 +8,10 @@ Vue.use(VueAxios, axios)
|
||||
Vue.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
Vue.axios.defaults.headers.common['Content-Type'] = 'application/json'
|
||||
|
||||
if (window.appConfig.APP_SUBDIRECTORY) {
|
||||
Vue.axios.defaults.baseURL = window.appConfig.subdirectory;
|
||||
}
|
||||
|
||||
Vue.axios.interceptors.response.use(response => response, error => {
|
||||
|
||||
// Return the error when we need to handle it at component level
|
||||
|
Reference in New Issue
Block a user