infra/stacks/rybbit/worker/wrangler.toml
Viktor Barzin 4117809a54 [rybbit] Deploy Cloudflare Worker for analytics injection
Replaces the broken Traefik rewrite-body plugin with a Cloudflare Worker
using HTMLRewriter to inject the rybbit tracking script into HTML responses
at the CDN edge.

- Wildcard route: *.viktorbarzin.me/* covers all proxied services
- 28 services have explicit site ID mappings
- Unmapped hosts pass through without injection
- Zero Traefik dependency, zero performance impact

Closes: code-sed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 21:26:16 +00:00

11 lines
449 B
TOML

name = "rybbit-analytics"
main = "index.js"
compatibility_date = "2024-01-01"
# Route: all Cloudflare-proxied *.viktorbarzin.me traffic.
# The worker only injects into HTML responses; non-HTML passes through untouched.
# Wildcard covers all proxied subdomains. The bare domain needs its own route.
routes = [
{ pattern = "viktorbarzin.me/*", zone_name = "viktorbarzin.me" },
{ pattern = "*.viktorbarzin.me/*", zone_name = "viktorbarzin.me" }
]