const config = {
withCredentials: true,
};
const get = (url, options = {}) => axios.get(`${API_URL}/${url}`, { ...options, ...config });;
Access to XMLHttpRequest at '<API domain>' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
'Access-Control-Allow-Origin': '*' // * или ваш домен
'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE'
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept'