docs(runner): send Origin and browser User-Agent in the /telemetry WAF verify curl - #380
Merged
Merged
Conversation
…WAF verify curl The probe posts to /telemetry/collect, whose browser gates 403 a request with no allowed Origin/Referer (host) or a bot User-Agent (bot). A bare curl therefore gets a Worker 403 that reads like the WAF still blocking. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The WAF-exception verification in
runner/docs/run-and-deploy.md(section 10,/telemetry/*) posts a<script>payload to/telemetry/collectwith a barecurl. That route runs the browser gates inworkers/o11y/src/gates/browser.tsfirst: the request host is read fromOrigin(falling back toReferer) and must bedemos.handsontable.com(or localhost only whenO11Y_ENV=local), otherwise the Worker answers 403{"error":"host"}; aUser-AgentmatchingBOT_RE(packages/runtime/src/telemetry/classify.ts, includescurl/) answers 403{"error":"bot"}. So the documented probe could never pass: it returned a Worker 403 that reads exactly like the WAF still blocking. The curl now sends anOriginand a browserUser-Agent, and one sentence explains why. Note:/telemetry/v1/logsis gated only byx-o11y-secret(no host or bot gate), and no other curl inrunner/docsposts to a browser-gated route, so this is the only example changed.Types of changes
runner/) changeHow was this verified?
Docs-only change. Read the gate code (
gates/browser.ts,gates/util.ts#requestHost/isAllowedHost,BOT_RE) andhandleOtlpLogs/checkExportSecretto confirm which routes apply which gate; greppedrunner/docs(run-and-deploy, observability-contract, ADRs) for other/telemetry/*curls. A teammate reported the same payload returning 204 in production with these two headers. No production calls were made from this branch.Checklist
runner/config/frameworks.json(see CONTRIBUTING.md); otherwise it won't appear on demos.handsontable.com (n/a, no example changed)pnpm build(andpnpm dev) in the affected example/server-example locally (n/a, docs only)Related issue(s):
Note
Low Risk
Documentation-only change to a deploy runbook curl example; no runtime or security logic is modified.
Overview
Updates the WAF exception verification for
/telemetry/*inrun-and-deploy.mdso the examplecurlmatches what/telemetry/collectactually enforces before the Worker parses the body.The doc now notes that browser gates (
workers/o11y/src/gates/browser.ts) return Worker403with{"error":"host"}or{"error":"bot"}whenOrigin/RefererorUser-Agentfail—so a barecurlcould look like the WAF still blocking. The probe addsOrigin: https://demos.handsontable.comand a browserUser-Agent, keeping the intended signal:400/401means the request reached the Worker,403at the edge means the WAF.Reviewed by Cursor Bugbot for commit 0a1164b. Bugbot is set up for automated code reviews on this repo. Configure here.