0

I have an api call like below in react using Axios.

axios({
            url: 'some url',
            method: 'get'
        })
        .then(function(response) {
            console.log(response);
        })
        .catch(function(response){
            console.log(response);
        });

and while running the app Im getting the below error

XMLHttpRequest cannot load 'some url' No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3003' is therefore not allowed access.

Can anyone help me how to resolve the issue?

knbibin
  • 1,099
  • 7
  • 18
  • 36

0 Answers0