From dfffd46a91f0cabb9b258343c18c7094da824d7a Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 20 Aug 2026 09:25:05 -0700 Subject: [PATCH] Route /api/* through the Worker so subscribe actually runs `run_worker_first` only listed "/", so Cloudflare's asset server answered /api/subscribe before the Worker ever ran and rejected the POST with a bare 405. The subscribe form has been broken since it shipped: every signup was dropped and the visitor saw a generic error, which is why the Resend "Blog" audience is empty and `just deploy live` fails to announce. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01RibbEtTdquFTTLJNEvrAn9 --- wrangler.jsonc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wrangler.jsonc b/wrangler.jsonc index 00c4802..bd5e2e9 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -15,9 +15,10 @@ "binding": "ASSETS", // Static assets are normally served before the Worker ever runs, which - // would skip the de.moq.dev -> /de rewrite for "/". Route just the root - // through the Worker; everything else still short-circuits to assets. - "run_worker_first": ["/"] + // would skip the de.moq.dev -> /de rewrite for "/" and swallow POSTs to + // /api/* with a bare 405. Route those through the Worker; everything else + // still short-circuits to assets. + "run_worker_first": ["/", "/api/*"] }, // Environment-specific configurations