diff options
author | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-30 02:25:07 +0300 |
---|---|---|
committer | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-30 02:25:07 +0300 |
commit | be0a035e662e3b7c1b7c8d62abd16b0c7f37bca1 (patch) | |
tree | 3968694e3b21149e129f60a255b53c6f2dcff09f | |
parent | 952f8ae3183b062e3b46791c793891f64dc771d5 (diff) | |
download | which-ui-be0a035e662e3b7c1b7c8d62abd16b0c7f37bca1.tar.gz |
delete headers from axios request
-rw-r--r-- | src/components/UploadImage/UploadImage.tsx | 2 | ||||
-rw-r--r-- | src/requests.ts | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/components/UploadImage/UploadImage.tsx b/src/components/UploadImage/UploadImage.tsx index d005830..f5e680d 100644 --- a/src/components/UploadImage/UploadImage.tsx +++ b/src/components/UploadImage/UploadImage.tsx @@ -6,7 +6,7 @@ import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogContentText from '@material-ui/core/DialogContentText'; import DialogTitle from '@material-ui/core/DialogTitle'; -import get from '../../../node_modules/axios'; +import get from 'axios'; interface PropTypes { isOpen: boolean; diff --git a/src/requests.ts b/src/requests.ts index 0af80dc..b02329d 100644 --- a/src/requests.ts +++ b/src/requests.ts @@ -5,8 +5,7 @@ const baseURL = process.env.NODE_ENV === 'production' ? 'https://which-api.herokuapp.com' : 'http://localhost:3030'; -const headers = ['Access-Control-Allow-Origin', '*']; -const requests = axios.create({ baseURL, headers }); +const requests = axios.create({ baseURL }); requests.interceptors.request.use(config => { const token = localStorage.getItem('token'); |