A live Bpost package tracker, self-hosted on Cloudflare Workers. The Worker serves the frontend and acts as a built-in CORS proxy for the bpost tracking API — no third-party proxy service needed.
| Path | What happens |
|---|---|
GET / |
Serves public/index.html (static asset) |
GET /proxy?url=<encoded> |
Worker fetches the bpost API URL server-side and adds CORS headers |
The proxy only forwards requests to https://track.bpost.cloud — any other origin is blocked with a 403.
- Node.js 18+
- A Cloudflare account (free tier is fine)
# 1. Clone the repo
git clone https://github.com/<your-username>/bpost-tracker.git
cd bpost-tracker
# 2. Install dependencies (just Wrangler)
npm install
# 3. Log in to Cloudflare
npx wrangler login
# 4. Run locally
npm run dev
# → http://localhost:8787
# 5. Deploy to Cloudflare
npm run deployAfter deploying, Cloudflare will print your public URL (e.g. https://bpost-tracker.<your-subdomain>.workers.dev).
bpost-tracker/
├── public/
│ └── index.html # The frontend (Tailwind + Leaflet single-page app)
├── src/
│ └── worker.js # Cloudflare Worker (proxy + static asset fallback)
├── wrangler.toml # Wrangler / Worker configuration
├── package.json
└── .gitignore
- In the Cloudflare dashboard, go to Workers & Pages → bpost-tracker → Settings → Triggers.
- Click Add Custom Domain and follow the prompts.