Most B2B teams scatter marketing pages, interactive ROI calculators, docs portals, and client sandboxes across disconnected Webflow, Vercel, and S3 origins—fracturing SEO authority and multiplying DNS and CORS friction.
- One origin, multiple self-contained apps: Co-locate root landing pages (
/), interactive funnels (/sprint-planner/), technical guides (/guides/), and proof demos (/demos/*) inside one./publicasset tree. - Path-scoped caching & indexing in
_headers: Keep HTML short-lived (max-age=600), CSS/JS/media long-lived (3600–86400), and client sandboxes strictlynoindex, nofollow. - Zero-CDN security posture: System font stacks and deferred same-origin ES modules achieve 100/100 Lighthouse without relaxing
script-src 'self'.
1. Single-Origin Multi-App Topology
Cloudflare Workers Static Assets replaces legacy Pages setups with unified routing, observability, and custom-domain bindings directly inside wrangler.jsonc. Instead of maintaining separate build pipelines for each micro-app, each directory under ./public owns its own relative stylesheet and deferred script bundle while inheriting domain-wide security headers.
High-intent conversion page, OfferCatalog JSON-LD, and live calculator (max-age=600).
Isolated scoped CSS/JS generating Markdown specs and Gumroad checkout routing.
Tagged X-Robots-Tag: noindex, nofollow so preview apps never dilute canonical SEO.
{
"name": "evsm-b2b-studio",
"compatibility_date": "2026-12-04",
"workers_dev": true,
"assets": {
"directory": "./public"
},
"routes": [
{
"pattern": "studio.sanavistaltd.com",
"custom_domain": true
}
],
"observability": {
"enabled": true,
"traces": { "enabled": true }
}
}
Notice there is no main Worker entrypoint unless you need dynamic API routes. Static requests resolve directly at the edge POP with 0 ms JavaScript isolate startup, while Cloudflare observability traces HTTP status codes and edge latency across every subpath.
2. Path-Scoped Security & Cache Rules in _headers
A single public/_headers file enforces baseline cryptographic security globally under /* while tuning cache lifetimes and search-indexing behavior per prefix.
/*
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=(), interest-cohort=()
Strict-Transport-Security: max-age=31536000; includeSubDomains
/index.html
Cache-Control: public, max-age=600
/styles.css
Cache-Control: public, max-age=3600
/preview/*
Cache-Control: public, max-age=86400
/demos/*
X-Robots-Tag: noindex, nofollow
Cache-Control: public, max-age=600
/vault-dl-*
X-Robots-Tag: noindex, nofollow
Cache-Control: private, no-store
Why Zero-CDN Architecture Simplifies Enterprise Security Reviews
Enterprise security teams routinely flag third-party font hosts, tag managers, and CDN script tags during vendor onboarding. Eliminating external requests yields three compounding benefits:
- Zero third-party supply-chain surface: Every byte in
script-src 'self'originates from your signed repository commit. - Instant First Contentful Paint: Using native system UI and monospace stacks (
Segoe UI Variable Display,Inter,Cascadia Code,system-ui) prevents render-blocking font waterfalls and layout shift (CLS = 0). - Deterministic JSON-LD compatibility: Browsers do not execute
<script type="application/ld+json">blocks, so rich Schema.org graphs validate cleanly without triggeringscript-src 'self'violations.
3. Edge Architecture Trade-Off Matrix
| Dimension | Workers Static Assets (Zero-Dep) | Heavy SSR / Jamstack Framework |
|---|---|---|
| TTFB & Cold Starts | 0 ms JS isolate startup | 15–180 ms SSR compute + hydration |
| Bundle Payload | 15–45 KB total HTML/CSS/ES | 250 KB – 1.4 MB vendor chunks |
| Strict CSP Readiness | Native (zero inline handlers) | Requires nonces or unsafe-inline JS |
| Multi-App Isolation | Self-contained sub-folders under public/ |
Shared router & fragile dependency lockfile |
| Maintenance Cost | 0 npm security patch cycles/yr | Quarterly framework upgrades |
4. Architecture Frequently Asked Questions
Why use Cloudflare Workers Static Assets instead of separate subdomains for funnels and tools?
Serving subpath applications such as /sprint-planner/ and /guides/ under one origin preserves root domain authority, eliminates cross-origin preflight overhead, and simplifies Content Security Policy enforcement via a single _headers manifest.
Does Cloudflare Workers Static Assets invoke a Worker isolate for every HTML or CSS file?
When using assets.directory without a custom Worker script, Cloudflare serves static assets directly from edge storage with zero Worker JS isolate cold start and no Worker CPU billing for static requests.
How do you prevent staging demos or private delivery vaults from appearing in Google search?
Combine Disallow rules in robots.txt with X-Robots-Tag: noindex, nofollow rules in public/_headers for prefixes like /demos/* and /vault-dl-*, plus Cache-Control: private, no-store on delivery endpoints.
What breaks most B2B landing pages under strict Content-Security-Policy?
Inline script tags, inline onclick event handlers, and external font or analytics CDNs trigger CSP violations under script-src 'self'. Moving all JS into deferred external files and using system font stacks removes these failure points.