Skip to content

Instantly share code, notes, and snippets.

@wing-puah
Last active April 6, 2019 10:03
Show Gist options
  • Select an option

  • Save wing-puah/0a751a406ab88a0ba48ef2f3fbfdb4fe to your computer and use it in GitHub Desktop.

Select an option

Save wing-puah/0a751a406ab88a0ba48ef2f3fbfdb4fe to your computer and use it in GitHub Desktop.
Proxy for API call to overwrite
const proxy = 'https://cors-anywhere.herokuapp.com/';
const CORSBlockedURL = 'https://www.some.block.url.com';
axios
.get(`${proxy}${CORSBlockedURL}`)
.then(res => {
console.log("res in axios", res);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment