Skip to content

fix(preview): remove public health endpoint - #103

Merged
iamjr15 merged 1 commit into
mainfrom
fix/remove-public-preview-health
Jul 31, 2026
Merged

fix(preview): remove public health endpoint#103
iamjr15 merged 1 commit into
mainfrom
fix/remove-public-preview-health

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the unauthenticated GET /health shortcut from the preview proxy.
  • Send preview requests through the existing host and token validation path so release metadata is not exposed publicly.
  • Update the route documentation to describe wildcard-host rejection.

Decision

Preview deployment status remains available through Cloudflare deployment/version metadata. No replacement internal binding is added because no runtime consumer needs preview-proxy release aggregation. Existing gateway liveness and release-convergence endpoints remain unchanged.

Validation

  • pnpm turbo lint typecheck build (55/55 tasks)
  • pnpm typecheck:scripts
  • pnpm architecture:check
  • pnpm deadcode
  • pnpm dev started the complete local stack
  • Direct browser check: gateway /health/live returned 200
  • Direct browser check: preview-host /health returned normal 401 token validation instead of release metadata

Reject preview health requests through the normal host and token validation path.
Deployment status stays in Cloudflare metadata without exposing release details.
@vercel

vercel Bot commented Jul 31, 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)
cheatcode Skipped Skipped Jul 31, 2026 8:42am

@iamjr15
iamjr15 merged commit 39d1a7c into main Jul 31, 2026
6 checks passed
@iamjr15
iamjr15 deleted the fix/remove-public-preview-health branch July 31, 2026 08:43
iamjr15 added a commit that referenced this pull request Jul 31, 2026
## Summary

Closes the last finding from the public-surface sweep that followed
#103: `webhooks.trycheatcode.com/health` answered publicly (200,
unauthenticated, unrate-limited) with `releaseSha`/`versionId`, while
its only real consumer — the gateway's release aggregation — reaches it
through the WEBHOOKS service binding as
`https://webhooks.internal/health`.

The route now gates on the internal hostname and returns Hono's plain
`notFound()` on any other host, indistinguishable from a route that does
not exist. Same rule as #103: every public route must have a named
external consumer. The four provider webhook POST endpoints
(signature-verified) are untouched.

## Deploy safety

Gateway is unchanged; its binding fetch already carries the
`webhooks.internal` hostname, so the gate passes for old and new gateway
alike — no deploy-order coupling, no skew window. Roll-forward as usual.

## Verification

- Gates: lint, typecheck, full `turbo build --force` (19 packages incl.
web), knip, dependency-cruiser (844 modules, 0 violations), skills
bundle — all green
- Post-deploy: public `GET webhooks.trycheatcode.com/health` → 404;
gateway `/health/release` still 200 with the webhooks leg (proves the
internal path intact)
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