vaporwavie / cors-now

reverse proxy with CORS headers.

Home Page:https://cors.now.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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?

  • For reverse proxies.

  • For crawlers, spiders and what not!

License

MIT © Hemanth.HM

About

reverse proxy with CORS headers.

https://cors.now.sh

License:MIT License


Languages

Language:JavaScript 100.0%