fix(relay): dodge the api.cloudflare.com WAF signature blocking all tunnel-relay deploys - #950
Conversation
Every upload of this Worker — including byte-identical re-uploads of the build already in production — began failing with an HTML 403 block page from Cloudflare's edge between 2026-07-26 and 2026-07-29. Binary-searching the source against the live API isolated the trigger to one line: `sourceReason || "host offline"`, which pattern-matches a SQL-injection signature (`x || '<literal>'` is SQL string concatenation). Verified by uploading the line alone (blocked) and the full file without it (passes). Spell the fallback as an explicit branch instead. No behavior change: sourceReason is a string, so the only falsy value is the empty string. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Every
ade-tunnel-relaydeploy since 2026-07-26 fails with an HTML 403 block page from Cloudflare's own API edge — including re-uploads of the exact build currently in production, under fresh tokens, from both CI and local IPs. Not a credential issue.Root cause
Cloudflare added/tightened a WAF rule fronting
api.cloudflare.comthat matchessourceReason || "host offline"(tunnelDo.ts:767) as a SQL-injection signature (x || '<literal>'is SQL concatenation). Isolated by binary-searching the source against the live versions API: the line alone is blocked, the full file without it passes, and current main with only this line rewritten uploads cleanly.Fix
One line: explicit branch + named constant instead of
||with a string literal.sourceReasonis typedstring, so behavior is identical.Verification
ade-tunnel-relay(carrying Relay worker micro-optimizations: socket-state caching, /prewarm, DO placement #946's changes) — post-merge check:/healthworkerVersion.tag equals this merge sha🤖 Generated with Claude Code