Skip to content

fix(relay): dodge the api.cloudflare.com WAF signature blocking all tunnel-relay deploys - #950

Merged
arul28 merged 1 commit into
mainfrom
fix/relay-waf-hostoffline
Jul 29, 2026
Merged

fix(relay): dodge the api.cloudflare.com WAF signature blocking all tunnel-relay deploys#950
arul28 merged 1 commit into
mainfrom
fix/relay-waf-hostoffline

Conversation

@arul28

@arul28 arul28 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Why

Every ade-tunnel-relay deploy 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.com that matches sourceReason || "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. sourceReason is typed string, so behavior is identical.

Verification

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview Jul 29, 2026 7:43pm

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@arul28, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e58572d-d5ea-4edf-969f-c16c65f430c8

📥 Commits

Reviewing files that changed from the base of the PR and between 088eb19 and 3bb579f.

📒 Files selected for processing (1)
  • apps/tunnel-relay/src/tunnelDo.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@arul28
arul28 merged commit 9efc1cf into main Jul 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant