ZDL
banner
zdl.bsky.social
ZDL
@zdl.bsky.social
👋 zdlldz.com
🔥
December 11, 2025 at 2:18 AM
TLDR for anyone running into 405s with @astro.build + @cloudflare.social:

Save yourself and do whatever you can to deploy static. For custom APIs, just create/connect a slim api-only Worker 😎

... future peeps, feel free to hmu w any related Qs!

Much love for Astro + Cloudflare regardless! 🙏✌️❤️
December 8, 2025 at 5:02 PM
In retrospect it's kinda obvious I guess. In practice this was painful AF to sort thru — we tried sooo many configs/hacks (thanks again @fubits.dev); local was always fine, so we had to redeploy each new fix to see if it worked in situ.
December 8, 2025 at 4:54 PM
TLDR we adjusted our APIs to allow Astro build static:

Converted custom tags architecture to output all tag indexes at build + rewired related ui/ux.

Then the key update: we moved our form api into a tiny new standalone Worker.
December 8, 2025 at 4:50 PM
The whole SSR bundle obv didn’t belong in a Worker.

Finally just realized we needed to adjust SSR assumption: custom builds and/or config flags wouldn’t fix architecture.
December 8, 2025 at 4:45 PM
But when deployed to Cloudflare every /api/* POST was 405 w/ empty body; wrangler tail said “only has assets.” We were deploying code-less assets, not our API.

Tied routes tweaks, _routes.json, dashboard routes, even pointing main at _worker.js/index.js — hit 64MB bundle limit, sharp native issues.
December 8, 2025 at 4:42 PM
Follow-up to this if anyone's running into similar issues with @astro + Cloudflare SSR + custom API routes...

Background: we had a few custom routes/apis defined which were working perfectly in localhost (e.g. tag architecture, form send, etc. Nothing too crazy). We built these assuming SSR deploy.
December 8, 2025 at 4:41 PM
Thanks @fubits.dev 🙏 will report back…
December 6, 2025 at 2:41 AM
All Astro/CF docs followed pretty stringently... CF-managed domain too...

Anyone know what's up with this?

My kingdom for a known/proven setup! 🏰 🙏💙
December 5, 2025 at 8:03 PM
Have correct Astro API handlers (prerender=false) and Cloudflare route docs.domain.io/, but Worker seems to serve assets only. Even forcing main entry + redeploy hasn’t made POSTs reach handlers.
docs.domain.io
December 5, 2025 at 8:01 PM
Custom API routes (e.g. POST contact/feedback) never hit code, just 405 empty responses. Deploy after deploy — tried everything (so many things). Still blocked.

Anyone have experience/solved SSR + custom Workers API routing?
v2.domain.io
December 5, 2025 at 7:58 PM
😍
November 28, 2025 at 8:24 PM
yess this is amazing 🙏❤️
November 20, 2025 at 4:56 PM