mirror of
https://github.com/citeworthyio/seo-agent.git
synced 2026-08-11 13:22:39 +02:00
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>
16 lines
339 B
JSON
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"]
|
|
}
|