Local .dev.vars vs production secrets for Astro on Workers Keep Turnstile, Resend, and NASA keys out of git while still running contact and APOD flows locally with Wrangler. Astro
17 posts tagged Astro.
February 2026
-
Local .dev.vars vs production secrets for Astro on Workers Keep Turnstile, Resend, and NASA keys out of git while still running contact and APOD flows locally with Wrangler. -
NASA APOD on the home page without blocking first paint Fetch APOD at build time, ship static JSON and WebP, and let the home page apply the background after paint—no runtime NASA calls on the Worker.
January 2026
-
Build-time WebP heroes with Astro and Cloudflare compile mode Move blog hero images into the content collection, generate WebP at build time, and skip runtime /cdn-cgi/image URLs in markup. -
Astro secrets on Cloudflare Workers without leaking to the client A small readEnv helper that checks cloudflare:workers env first, then Astro env, so Turnstile and Resend work in production and locally. -
Why Cloudflare Worker logs only show some routes Static assets bypass your Worker on purpose. Here is how prerendered dist/client output maps to what you see in observability on Astro 6 + Cloudflare.