Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Apple2TS Proxy

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.

Live deployment

Endpoints

DemoZoo 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.

Disk and external-page proxy

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.

Deploy with Cloudflare Pages

  1. Create a Cloudflare Pages project.

  2. Connect the repository anomixer/apple2ts-proxy.

  3. Use these settings:

    Framework preset: None
    Build command: leave empty
    Build output directory: public
    Production branch: main
    
  4. Enable automatic production deployments for main.

  5. 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.

Local development

npx wrangler pages dev public

The local proxy is available at http://localhost:8788.

Apple2TS frontend configuration

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.

Architecture

Apple2TS frontend
  ├─ GitHub Pages or Cloudflare Pages
  └─ calls apple2ts-proxy.pages.dev
       ├─ /api/demozoo-direct/*  →  DemoZoo
       └─ /api/disk-direct       →  external disk hosts

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages