Skip to content

Bypass Start for marketing requests - #1637

Merged
RhysSullivan merged 1 commit into
mainfrom
fix/marketing-start-bypass
Aug 17, 2026
Merged

Bypass Start for marketing requests#1637
RhysSullivan merged 1 commit into
mainfrom
fix/marketing-start-bypass

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

What changed

  • classify production marketing requests at the Worker entry
  • dispatch them through the existing MARKETING service binding before TanStack Start
  • preserve signed-in homepage routing, public path behavior, and the /home rewrite
  • add request-level regression coverage for cookies, hosts, queries, headers, methods, and bodies

Why

The marketing proxy lived inside TanStack Start middleware. On a cold isolate, a homepage request therefore loaded the 2.56 MB lazy Start server graph before forwarding to the fast marketing Worker. This moves the routing decision ahead of that import, so public pages only pay the small Worker-entry path.

Validation

  • bun run typecheck
  • bun run lint
  • bun run --cwd apps/cloud build
  • bun run --cwd apps/cloud test -- src/edge/marketing.test.ts (22 passed)
  • production bundle exercised in Miniflare with a real service binding

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@RhysSullivan
RhysSullivan marked this pull request as ready for review August 17, 2026 23:07
@RhysSullivan
RhysSullivan merged commit ffb28cc into main Aug 17, 2026
19 of 20 checks passed
@RhysSullivan
RhysSullivan deleted the fix/marketing-start-bypass branch August 17, 2026 23:07
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