Files
Alan WizemannandClaude Fable 5 e860f7d3ee Add standalone proxy injector for non-Worker origins
A ready-to-deploy Worker (injector/) that sits in FRONT of any Cloudflare-fronted
origin — a static Pages site, an S3 bucket, anything you can't add middleware to —
and merges the agent's KV overrides into HTML <head> with HTMLRewriter. Proxies
everything else through untouched. Fail-open (any error serves the origin
directly), zero deps, config-driven (ORIGIN_HOST + shared SEO_OVERRIDES KV + a
route). Drops content-encoding/length on rewrite so the runtime re-compresses
correctly. This is the injector side for the 'adopt on a non-owned origin' path.

Validated in local wrangler dev against a real origin: pass-through serves origin
content unchanged, an override merges title/description (+ og/twitter mirrors)
with the page fully intact, non-HTML streams through. Typechecks clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 21:29:57 -04:00

16 lines
339 B
JSON

{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"isolatedModules": true,
"moduleDetection": "force",
"types": []
},
"include": ["src/**/*.ts", "worker-configuration.d.ts"]
}