From 5880137dd8a8c513c354ba690cf0cd9c976a7214 Mon Sep 17 00:00:00 2001 From: kurpfish Date: Mon, 9 Aug 2021 11:18:09 +0300 Subject: [PATCH] no cors queries --- src/server/server.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/server/server.js b/src/server/server.js index 1e35ff08..4a3e2513 100644 --- a/src/server/server.js +++ b/src/server/server.js @@ -3,9 +3,9 @@ export const fetchProfile = async (link, index) => { const response = await fetch(`${link}${index}`, { method: 'GET', headers: { - 'Access-Control-Request-Headers': 'authorization', + // 'Access-Control-Request-Headers': 'authorization', 'Authorization': `Bearer ${localStorage.getItem('auth_token')}`, - 'Origin': `${process.env.REACT_APP_BASE_URL}`, + // 'Origin': `${process.env.REACT_APP_BASE_URL}`, } }) let data = await response.json() @@ -19,9 +19,9 @@ export const fetchSkills = async (link) => { const response = await fetch(link, { method: 'GET', headers: { - 'Access-Control-Request-Headers': 'authorization', + // 'Access-Control-Request-Headers': 'authorization', 'Authorization': `Bearer ${localStorage.getItem('auth_token')}`, - 'Origin': `${process.env.REACT_APP_BASE_URL}`, + // 'Origin': `${process.env.REACT_APP_BASE_URL}`, } }) let data = await response.json() @@ -36,9 +36,9 @@ export const fetchItemsForId = async (link, id) => { const response = await fetch(`${link}${id}`, { method: 'GET', headers: { - 'Access-Control-Request-Headers': 'authorization', + // 'Access-Control-Request-Headers': 'authorization', 'Authorization': `Bearer ${localStorage.getItem('auth_token')}`, - 'Origin': `${process.env.REACT_APP_BASE_URL}`, + // 'Origin': `${process.env.REACT_APP_BASE_URL}`, } }) let data = await response.json() @@ -52,9 +52,9 @@ export const fetchForm = async (link, info) => { const response = await fetch(link, { method: 'POST', headers: { - 'Access-Control-Request-Headers': 'authorization', + // 'Access-Control-Request-Headers': 'authorization', 'Authorization': `Bearer ${localStorage.getItem('auth_token')}`, - 'Origin': `${process.env.REACT_APP_BASE_URL}`, + // 'Origin': `${process.env.REACT_APP_BASE_URL}`, 'Content-Type': 'multipart/form-data' }, body: info @@ -74,7 +74,7 @@ export const fetchAuth = async ({ username, password, dispatch }) => { method: 'POST', headers: { 'Content-Type': 'application/json', - 'Origin': `${baseURL}`, + // 'Origin': `${baseURL}`, }, body: JSON.stringify({ username,