Question: I'm running into an issue with my isomorphic JavaScript app using React and Express. 

I am trying to make an HTTP request with axios.get when my component mounts

```
componentDidMount() {
  const url = 'http://ufc-data-api.ufc.com/api/v3/iphone/fighters/title_holders';
  axios.get(url).then( res => {
    //use res to update current state
  })
}

```

I am getting a status 200 res from the API, but I am not getting any response data and getting an error in my console

```
XMLHttpRequest cannot load http://ufc-data-api.ufc.com/api/v3/iphone/fighters/title_holders. 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'http://localhost:3000' is therefore not allowed access.

```

However, if I make the request in my server.js

```
const url = 'http://ufc-data-api.ufc.com/api/v3/iphone/fighters/title_holders';
axios.get(url).then(res => {
    //console.log(res);
});

```

It works fine and I get response data when the server starts. Is this an issue with the actual API or am I doing something wrong? If this was a CORS issue I'm guessing the request in server.js wouldn't work either? Thanks!

Answer: 
Use the google Chrome Extension called [Allow-Control-Allow-Origin: \*](https://chrome.google.com/webstore/detail/allow-cors-access-control/lhobafahddgcelffkeicbaginigeejlf?hl=en). It modifies the CORS headers on the fly in your application.
I think the answer for your question is [here](https://stackoverflow.com/questions/28547288/no-access-control-allow-origin-header-is-present-on-the-requested-resource-err)

> 
> To have Chrome send Access-Control-Allow-Origin in the header, just alias your localhost in your /etc/hosts file to some other domain, like:
> 
> 
> 127.0.0.1 localhost yourdomain.com
> 
> 
>