Launch Benchmarks / 2026 Vibe Security Study / Cloudflare Pages & Workers
Cloudflare Pages & Workers Hardening (2026) · Read-Only 6-Phase Scanner

Cloudflare Pages & Workers Security Headers & Pre-Launch Scanner

Cloudflare's edge handles TLS 1.3 and DDoS mitigation automatically, yet Cloudflare Pages and Workers still leave application-layer security headers (CSP, X-Frame-Options, Permissions-Policy, COOP/CORP) and client bundle hygiene up to your code. Verify your live edge headers free.

1-click live demo:

Top 4 Pre-Launch Risks in Cloudflare Pages & Workers Production Apps

1. Missing Application Security Headers at the Edge

Cloudflare does not inject Content-Security-Policy, X-Frame-Options, Permissions-Policy, or Cross-Origin-Opener-Policy by default — leaving sites exposed to clickjacking and XSS.

2. Secrets Bundled into Frontend Assets Instead of Worker Secrets

Always store third-party API keys via wrangler secret put rather than Vite/Astro public env vars compiled into static assets.

3. Permissive CORS & Unprotected Worker API Routes

Avoid reflecting arbitrary Origin headers with Access-Control-Allow-Credentials: true on authenticated Worker endpoints.

4. Leaked Source Maps & Staging Subdomains

Ensure .js.map files are excluded from dist/ and audit both your custom domain and .pages.dev origin.

Copy-Paste Cloudflare Worker Security Header Wrapper (MIT)

// From github.com/zColdWater/vibe-security-checklist/configs/cloudflare-headers.js
const SECURITY_HEADERS = {
  "Strict-Transport-Security": "max-age=63072000; includeSubDomains; preload",
  "X-Content-Type-Options": "nosniff",
  "X-Frame-Options": "DENY",
  "Referrer-Policy": "strict-origin-when-cross-origin",
  "Permissions-Policy": "camera=(), microphone=(), geolocation=()",
  "Cross-Origin-Opener-Policy": "same-origin",
  "Cross-Origin-Resource-Policy": "same-site",
};
export default {
  async fetch(request, env, ctx) {
    const res = await fetch(request);
    const out = new Response(res.body, res);
    for (const [k, v] of Object.entries(SECURITY_HEADERS)) out.headers.set(k, v);
    return out;
  },
};

Frequently Asked Questions

Should I use Cloudflare Transform Rules, _headers, or a Worker for security headers?

For static Cloudflare Pages sites, a public/_headers file is the simplest zero-overhead approach. For dynamic Workers or proxied origins, wrapping responses in a Worker or Cloudflare Response Header Transform Rule ensures every route ships consistent headers.

How much does VibeShield v7.0 cost?

Live 116-check scanning is 100% free with zero signup. Unlocking exact evidence and tailored fix scripts is $2 one-time during our Launch Special (was $9, 14-day refund guarantee).

Launch Special: Unlock Exact Locations & 5-Platform Fixes for $2 (was $9) One-time perpetual browser unlock (78% off during Launch Special, zero monthly subscription, 14-day refund guarantee) — or grab the OmniForge Complete Suite (VibeShield + InboxShield + CiteReady) for $5 once (was $29).
Run Free 6-Phase Scan → Unlock VibeShield — $2 (was $9) Complete 3-App Suite — $5 (was $29)

More Stack Hardening Guides & Empirical Research

55 Live Apps Audited

State of Vibe-Coded Web App Security (2026)

Full 6,120+ check empirical benchmark study across Vercel, Custom Domains & GitHub Pages.

Read full study →
Stack Guide

Lovable Pre-Launch Security

Audit your .lovable.app or custom domain in 2 seconds before launch: check Supabase Row Level Security (RLS), leaked client A...

Open Lovable guide →
Stack Guide

Cursor & Next.js Pre-Launch Security

Stop shipping NEXT_PUBLIC_ secret leaks, public .js.map source maps, and missing CSP/HSTS headers in Cursor + Next.js + Verce...

Open Cursor & Next.js guide →
Stack Guide

Bolt.new & Netlify Pre-Launch Security

Audit your Bolt.new / .netlify.app / Vite production site free in 2 seconds: detect VITE_ API key leaks, public .js.map sourc...

Open Bolt.new & Netlify guide →
Stack Guide

Supabase RLS Pre-Launch Security

20% of newly launched AI web apps ship live Supabase backends. Run a read-only passive RLS & service_role key leak audit in 2...

Open Supabase RLS guide →
Stack Guide

v0.dev & Vercel Pre-Launch Security

Audit your v0.dev / Vercel Next.js deployment in 2 seconds before sharing: detect missing CSP/HSTS headers, leaked NEXT_PUBLI...

Open v0.dev & Vercel guide →
Stack Guide

Replit Agent Pre-Launch Security

Audit your .replit.app or custom Replit deployment passively in 2 seconds: catch exposed client API keys, missing Express/Fla...

Open Replit Agent guide →
Stack Guide

Firebase & Firestore Pre-Launch Security

Audit your deployed Firebase web app passively in 2 seconds: detect open Firestore/RTDB test-mode rules, leaked service accou...

Open Firebase & Firestore guide →