|
@@ -4,6 +4,22 @@ import axios from 'axios'
|
|
|
|
|
|
// console.log('drupalSettings', drupalSettings)
|
|
|
|
|
|
+// axios.interceptors.response.use(
|
|
|
+// response => {
|
|
|
+// // console.log('ma-axios interceptor response', response)
|
|
|
+// return Promise.resolve(response)
|
|
|
+// // return response
|
|
|
+// },
|
|
|
+// error => {
|
|
|
+// const { status } = error.response
|
|
|
+// console.warn('error in ma-axios response interceptor, status:', status)
|
|
|
+// if (status === 403) {
|
|
|
+// window.location = '/'
|
|
|
+// }
|
|
|
+// return Promise.reject(error)
|
|
|
+// }
|
|
|
+// )
|
|
|
+
|
|
|
const MA = axios.create({
|
|
|
baseURL: window.location.origin + '/' + drupalSettings.path.pathPrefix,
|
|
|
withCredentials: true,
|