diff --git a/src/index.js b/src/index.js index a94df63e6..fdbcc48d4 100644 --- a/src/index.js +++ b/src/index.js @@ -7,31 +7,11 @@ import ReactDOM from 'react-dom'; import * as serviceWorker from './serviceWorker'; import { setHTTPTimeout } from 'external'; -import axios from 'axios'; -import { getAuthToken } from 'utils'; - -const axiosInterceptor = axios.interceptors.request.use( - function(config) { - config.headers.Authorization = getAuthToken(); - return config; - }, - function(error) { - console.log(error); - return Promise.reject(error); - } -); // bring in our temba-components if they aren't already registered if (typeof customElements !== 'undefined' && !customElements.get('temba-textinput')) { import('@nyaruka/temba-components').then(() => { console.log('Loading temba components'); - - const origOpen = XMLHttpRequest.prototype.open; - XMLHttpRequest.prototype.open = function() { - origOpen.apply(this, arguments); - this.setRequestHeader('Authorization', getAuthToken()); - }; - axios.interceptors.request.eject(axiosInterceptor); }); }