Skip to content

Latest commit

 

History

History
 
 

proxy

Application Routing / Reverse Proxy

Light-weight reverse proxy implemented by using Cloudflare Workers.

  • https://example.com/, /about, /pricing, /blog/*, etc.
    ↳ routed to https://example.webflow.io
  • https://example.com/help/*
    ↳ routed to https://intercom.help
  • https://example.com/graphql, /auth/google, /auth/google/return etc.
    ↳ routed to the GraphQL API server (Google Cloud Function or Cloud Run)
  • https://example.com/admin/*
    ↳ routed to the admin dashboard (Cloudflare Workers Site)
  • https://example.com/* the rest of the pages
    ↳ routed to the main web application (Cloudflare Workers Site)

Tech Stack

How to Build

$ yarn build                    # Compile and bundle the code with Babel, Webpack

How to Deploy

Compile and bundle the code into dist/proxy.js (build), upload application bundle to Google Cloud Storage (push), and finally, deploy or re-deploy it to Cloudflare Workers (deploy).

$ yarn run build
$ yarn run push [--version #0]
$ yarn run deploy [--version #0] [--env #0] [--no-download]

References

License

Copyright © 2016-present Kriasoft. This source code is licensed under the MIT license found in the LICENSE file.