Skip to content

rubrion/cf-pages-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare Pages Proxy

This project lets you expose a *.pages.dev URL while serving your app from an upstream Cloudflare Worker.

What It Does

  • Uses a catch-all Pages Function at functions/[[path]].js
  • Proxies every request to UPSTREAM_BASE_URL
  • Preserves method, path, query string, and body

Setup in Cloudflare Pages

  1. Create a new Pages project from this repo.
  2. Build command: leave empty.
  3. Build output directory: public.
  4. Add environment variable:
    • UPSTREAM_BASE_URL = https://your-worker.workers.dev
  5. Deploy.

Local Development

npm install
npm run dev

Notes

  • Add your final *.pages.dev URL to Supabase allowed redirect/site URLs if needed.
  • This proxy project is intentionally separate from your main app repo to keep deployments simple.

cf-pages-proxy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors