reverse proxy with CORS headers.
Just do a fetch
on the below:
https://cors.now.sh/<url>
Example:
// The XKCD URL below doesn't allow CORS.
fetch('https://cors.now.sh/http://xkcd.com/info.0.json')
.then(console.log)
.catch(console.error)
P.S: Make sure you give the absolute URL, or else you will see an error like:
{
"error": "Only absolute urls are supported"
}
-
For reverse proxies.
-
For crawlers, spiders and what not!
MIT © Hemanth.HM