Fix Turnstile widget not showing on Astro contact page (site key and script load) When /contact renders without a Cloudflare Turnstile challenge, PUBLIC_TURNSTILE_SITE_KEY is usually missing at SSR time or api.js never loads. Fix site key bindings, readEnv, and script gating on Workers. Cloudflare
14 posts tagged Cloudflare.
June 2026
-
Fix Turnstile widget not showing on Astro contact page (site key and script load) When /contact renders without a Cloudflare Turnstile challenge, PUBLIC_TURNSTILE_SITE_KEY is usually missing at SSR time or api.js never loads. Fix site key bindings, readEnv, and script gating on Workers. -
Fix contact form 502 or 503 when RESEND_API_KEY is missing in production When POST /api/contact fails because Resend is not configured, the Worker cannot read RESEND_API_KEY at request time. Fix Cloudflare secrets, env names, and redeploy steps on Astro + Workers.
May 2026
-
Fix TURNSTILE_SECRET_KEY is not configured (503) on Cloudflare Workers When POST /api/contact returns 503 Turnstile not configured, TURNSTILE_SECRET_KEY is missing at request time. Fix Worker secrets, env name mismatches, and redeploy steps. -
Wrangler deploy dry-run in CI before merging to main A green Astro build is not the same as a deployable Worker bundle. I run wrangler deploy --dry-run on every PR so Wrangler config and bundle size fail in CI, not on main. -
Checklist before shipping a small personal site A practical pre-launch checklist for personal websites: performance, SEO basics, contact reliability, and rollback safety.
April 2026
-
Turnstile + Resend Contact Form: Complete Setup for Astro A practical, end-to-end guide for adding a spam-resistant contact form to an Astro site using Cloudflare Turnstile and Resend. -
Rebuilding mayfield.io with less ceremony A short note on refreshing my personal site with Astro and Cloudflare—and how it grew into a practical blog without turning into a big project. -
Fix Resend 403 and 422 errors on an Astro contact form (Cloudflare Workers) When Turnstile passes but email still fails, Resend is usually rejecting the from address or API key. Here is how to read 403/422 responses and fix Astro + Workers config.
March 2026
-
Fix Astro API route 404 on Cloudflare Workers (/api/contact) When the contact form fetch returns 404 in production, the Worker often never registered the route. Here is how prerender, build output, and file placement interact on Astro 6 + Cloudflare. -
Fix “Turnstile verification failed” on Cloudflare (403): complete checklist Seeing turnstile verification failed, turnstile has not verified, or failed to verify cloudflare turnstile token? Fix 403 errors with key pairing, hostname checks, and siteverify debugging.
February 2026
January 2026