{ // The tracking Worker. No D1 binding, on purpose: the token is // self-validating, so this stays a tiny bundle with an invisible cold start // on the path of every image load in every message ever sent. "$schema": "../../node_modules/wrangler/config-schema.json", "name": "mailysend-track", "main": "src/index.ts", "compatibility_date": "2026-09-01", "observability": { "enabled": true, "head_sampling_rate": 0.01 }, // Set this to your own deployment before deploying the tracking Worker: it is // where an expired or unrecognised token redirects, and the origin the /u/* // preference routes are forwarded to. This Worker is optional — the app // serves /o, /c and /u itself unless you split them out. "vars": { "MS_PUBLIC_URL": "https://mailysend.example.com" }, // No id: a literal placeholder fails wrangler's binding validation before // the upload. Omitted, wrangler provisions the namespace on first deploy. // Point it at the app's own CACHE namespace if you want shared token state. "kv_namespaces": [{ "binding": "CACHE" }], "queues": { "producers": [{ "binding": "EVENTS_QUEUE", "queue": "ms-events-norm" }] } }