GithubHelp home page GithubHelp logo

7a6163 / cors-proxy Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2 KB

CORS Anywhere with Hono and Cloudflare Workers

TypeScript 100.00%
cloudfalre cloudflare-worker cloudflare-workers cors-proxy serverless

cors-proxy's Introduction

CORS Anywhere with Hono and Cloudflare Workers

This project demonstrates how to create a CORS Anywhere proxy using the Hono framework and deploy it on Cloudflare Workers.

Features

  • 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.ico requests.

Installation

  1. Clone the repository:

    git clone https://github.com/7a6163/cors-proxy
    cd cors-proxy
  2. Install dependencies:

    npm install
  3. Deploy to Cloudflare Workers:

    npm run deploy

Usage

Once deployed, you can use your CORS Anywhere proxy by passing the target URL directly in the path.

Examples

  • 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 - Proxies https://google.com/.
  • https://your-worker-subdomain.workers.dev/ - Shows usage text.
  • https://your-worker-subdomain.workers.dev/favicon.ico - Replies with 404 Not Found.

License

This project is licensed under the MIT License.

cors-proxy's People

Contributors

7a6163 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.