Cloudflare Worker for African movies API proxy
# AfricaProxy Worker — Cloudflare Worker for African Streaming Content
A zero-dependency Cloudflare Worker that proxies and aggregates African movie content from the WeFeed/123Movies API. Designed as a lightweight BFF (Backend-for-Frontend) for streaming platforms serving SA Drama, Nollywood, and Showmax Original content.
## Quick Start
```bash
git clone
github.com
cd africaproxy
cp wrangler.toml wrangler.toml.local
npx wrangler dev
# Server running at
localhost
```
Requires `AUTH_TOKEN` set via `wrangler secret put AUTH_TOKEN` or in `.dev.vars`.
## API
### African movies
```
GET /api/african-movies?page=1
```
Aggregates movies from three African categories (SA Drama, Nollywood, Showmax Original). Returns 20 per category per page with `originCategory` labels and deduplication.
### Stream URL
```
GET /api/stream?id={id}&path={path}&se=&ep=
```
Fetches stream play URL from the upstream API. Tries primary API base first, falls back to secondary. Returns HLS manifest URLs.
### Detail
```
GET /api/detail?path={path}
```
Fetches movie or show metadata from the WeFeed API.
### Health
```
GET /api/health
```
Returns status and whether `AUTH_TOKEN` is configured.
## Architecture
```
Client Request -> Cloudflare Worker (africaproxy) -> WeFeed H5 API
/api/african-motes aggregates 3 categories (SA, Nollywood, Showmax)
/api/stream proxies with session rotation + fallback
/api/detail fetches metadata
```
## Features
- **Zero runtime dependencies** — pure `fetch` API, no Node packages needed
- **Category aggregation** — merges 3 African content categories with deduplication
- **Auto session rotation** — generates random session ID per request
- **Smart header spoofing** — mimics Chrome 120 on Windows with proper `sec-*` headers, Nairobi timezone
- **Dual API fallback** — automatically retries secondary API base if primary returns no resources
- **CORS enabled** — all endpoints return allow-all …