- Create src/worker.ts: Workers-compatible relay handler using env
bindings instead of process.env, exports { fetch } for Workers runtime
- Update wrangler.toml: point to new src/worker.ts entry point
- Update deploy.yml: add wrangler-action deploy step after tests pass
- The worker reuses the same relay logic from src/lib/ and src/middleware/
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
16 lines
663 B
TOML
16 lines
663 B
TOML
name = "edge-proxy-relay"
|
|
main = "src/worker.ts"
|
|
compatibility_date = "2025-12-01"
|
|
compatibility_flags = ["nodejs_compat"]
|
|
|
|
# ── Cloudflare account (fill in your Account ID) ─────────────────────────────
|
|
# Find it in the Cloudflare Dashboard → Workers & Pages → right sidebar
|
|
# account_id = ""
|
|
# workers_dev = true
|
|
|
|
# ── Environment Variables ───────────────────────────────────────────────────
|
|
# [vars]
|
|
# RELAY_TIMEOUT_MS = "30000"
|
|
# RATE_LIMIT_MAX = "200"
|
|
# RATE_LIMIT_WINDOW_MS = "60000"
|