aboutsummaryrefslogtreecommitdiff
path: root/src/requests.ts
diff options
context:
space:
mode:
authorilyayudovin <ilyayudovin123@gmail.com>2020-06-30 02:09:37 +0300
committerilyayudovin <ilyayudovin123@gmail.com>2020-06-30 02:09:37 +0300
commit952f8ae3183b062e3b46791c793891f64dc771d5 (patch)
tree8ccf1073a596869215cde6e20b7d9d6848b571e3 /src/requests.ts
parent720a32c4cb1697f3a8f90973f28c334551ab87ff (diff)
downloadwhich-ui-952f8ae3183b062e3b46791c793891f64dc771d5.tar.gz
fix eslint errors
Diffstat (limited to 'src/requests.ts')
-rw-r--r--src/requests.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/requests.ts b/src/requests.ts
index b02329d..0af80dc 100644
--- a/src/requests.ts
+++ b/src/requests.ts
@@ -5,7 +5,8 @@ const baseURL = process.env.NODE_ENV === 'production'
? 'https://which-api.herokuapp.com'
: 'http://localhost:3030';
-const requests = axios.create({ baseURL });
+const headers = ['Access-Control-Allow-Origin', '*'];
+const requests = axios.create({ baseURL, headers });
requests.interceptors.request.use(config => {
const token = localStorage.getItem('token');