Server-side proxy functions for the Apple2TS DemoZoo integration.
The main Apple2TS application remains a static frontend. This project provides the server-side layer required to fetch DemoZoo pages and external disk images without making those requests directly from the browser.
- Proxy: https://apple2ts-proxy.pages.dev/
- Apple2TS GitHub Pages: https://anomixer.github.io/apple2ts/
- Apple2TS Cloudflare Pages: https://apple2ts.pages.dev/
- Source: https://github.com/anomixer/apple2ts-proxy
GET /api/demozoo-direct/<path>
Examples:
/api/demozoo-direct/api/v1/productions/348989/?format=json
/api/demozoo-direct/productions/348989/
Requests are forwarded to https://demozoo.org and returned with CORS
headers for approved Apple2TS origins.
GET /api/disk-direct?url=<encoded-url>
This endpoint fetches a disk image, ZIP archive, or external project page and streams the response back to Apple2TS.
-
Create a Cloudflare Pages project.
-
Connect the repository
anomixer/apple2ts-proxy. -
Use these settings:
Framework preset: None Build command: leave empty Build output directory: public Production branch: main -
Enable automatic production deployments for
main. -
Save and deploy.
Cloudflare Pages automatically detects the top-level functions/ directory and
deploys the Pages Functions together with the static files in public/.
No API key is required by the current implementation. The functions apply an
origin allowlist and reject localhost/private target hosts. If another
frontend domain needs access, update the allowlist in
functions/_shared/cors.ts and redeploy.
npx wrangler pages dev public
The local proxy is available at http://localhost:8788.
Static deployments such as GitHub Pages should set:
VITE_DEMOZOO_ENABLED=true
VITE_DEMOZOO_PROXY_URL=https://apple2ts-proxy.pages.dev
Cloudflare-hosted Apple2TS builds may leave VITE_DEMOZOO_PROXY_URL unset and
use their same-origin /api/ routes instead.
Apple2TS frontend
├─ GitHub Pages or Cloudflare Pages
└─ calls apple2ts-proxy.pages.dev
├─ /api/demozoo-direct/* → DemoZoo
└─ /api/disk-direct → external disk hosts