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>
11 lines
449 B
TOML
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" }
|
|
]
|