This project demonstrates how to create a CORS Anywhere proxy using the Hono framework and deploy it on Cloudflare Workers.
- Proxy requests to bypass CORS restrictions.
- Handles URLs passed directly in the path.
- Supports both HTTP and HTTPS.
- Shows usage instructions when accessed without a URL.
- Returns a 404 for
/favicon.icorequests.
-
Clone the repository:
git clone https://github.com/7a6163/cors-proxy cd cors-proxy -
Install dependencies:
npm install
-
Deploy to Cloudflare Workers:
npm run deploy
Once deployed, you can use your CORS Anywhere proxy by passing the target URL directly in the path.
https://your-worker-subdomain.workers.dev/http://google.com/- Proxies requests to Google.com with CORS headers.https://your-worker-subdomain.workers.dev/google.com- Same as previous, defaults to HTTPS.https://your-worker-subdomain.workers.dev/google.com:443- Proxieshttps://google.com/.https://your-worker-subdomain.workers.dev/- Shows usage text.https://your-worker-subdomain.workers.dev/favicon.ico- Replies with 404 Not Found.
This project is licensed under the MIT License.