Bonsai edge delivery lab · Staging

Vercel custom-origin readiness

This storefront is the controlled origin used to prove that Bonsai can preserve a customer hostname while Cloudflare resolves the request to a Vercel deployment behind the scenes.

Public storefront HTTP 200 Preserved-Host fallback HTTP 200 Cloudflare managed TLS active

Customer onboarding and offboarding

DNS record the customer edits

CNAME named shopify-vercel.tinytreetoys.red

Turn Bonsai on

Set Target to ai.hibonsai.red

Turn Bonsai off or roll back

Set Target back to e09e3a66fb0a9fd7.vercel-dns-017.com

The customer changes only the Target field. Keep the record name and every other DNS setting exactly as they are. No nameserver change or Vercel deployment is needed.

Bonsai provider path

Cloudflare for SaaS fallback

https://ai.hibonsai.red

Worker route

ai.hibonsai.red/* → edge-worker-stg

Customer-host route

shopify-vercel.tinytreetoys.red/* → edge-worker-stg

The shared edge worker keeps existing direct customer-zone delivery and selects the new Vercel method only for typed custom-origin customers.

Origin resolution override

Preserved request identity

Host: shopify-vercel.tinytreetoys.red

Provider request-override DNS

origin-shopify-vercel-tinytreetoys-red.hibonsai.red

Vercel target

A 76.76.21.21 · Cloudflare proxied

Cloudflare changes DNS resolution with cf.resolveOverride; it does not replace the customer Host header Vercel uses to select the project and certificate.

Request flow

01 Customer request Public URL and Host remain shopify-vercel.tinytreetoys.red
02 Bonsai fallback ai.hibonsai.red invokes edge-worker-stg
03 Resolution override Cloudflare resolves through the provider-owned origin record
04 Vercel origin Vercel receives the preserved Host and serves this project

Reproduce the edge proof

Send the customer hostname through the staging fallback without changing public storefront DNS.

curl -i https://ai.hibonsai.red/ \
  -H 'X-Forwarded-Host: shopify-vercel.tinytreetoys.red'

Expected evidence: HTTP 200, this page body, a Vercel request identifier, a Cloudflare Ray, and the Bonsai WebMCP injection. An unknown forwarded hostname returns HTTP 502.