From c0bf0c61b2676848a5fbd4b5eeb09aef33104184 Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Tue, 13 Apr 2021 16:29:52 +0530 Subject: [PATCH] remove authorization from here --- src/index.js | 20 -------------------- 1 file changed, 20 deletions(-) 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); }); }