cors-now

reverse proxy with CORS headers.

Usage:

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"
}

WHY?

License

MIT © Hemanth.HM