Bonsai edge delivery lab · Production

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.com

Turn Bonsai on

Set Target to ai.hibonsai.com

Turn Bonsai off or roll back

Set Target back to 539015587c4eca32.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.com

Worker route

ai.hibonsai.com/* → edge-worker

Customer-host route

shopify-vercel.tinytreetoys.com/* → edge-worker

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.com

Provider request-override DNS

origin-shopify-vercel-tinytreetoys-com.hibonsai.com

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.com
02 Bonsai fallback ai.hibonsai.com invokes edge-worker
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.com/ \
  -H 'X-Forwarded-Host: shopify-vercel.tinytreetoys.com'

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.