From aabc2de7d8914fbac62a3cd930c6a27866ee593c Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 16 Mar 2026 12:32:00 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20/rtasks/check/:token=20404=20=E2=80=94=20?= =?UTF-8?q?bypass=20module=20rewriting=20for=20checklist=20routes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bare-domain and subdomain routing intercepted /rtasks/check/* paths, rewriting them to /demo/rtasks/check/* which didn't match any route. Co-Authored-By: Claude Opus 4.6 --- server/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/index.ts b/server/index.ts index 0d41627..9730b47 100644 --- a/server/index.ts +++ b/server/index.ts @@ -2325,6 +2325,7 @@ const server = Bun.serve({ url.pathname.startsWith("/api/") || url.pathname.startsWith("/data/") || url.pathname.startsWith("/encryptid/") || + url.pathname.startsWith("/rtasks/check/") || url.pathname.startsWith("/.well-known/") || url.pathname === "/about" || url.pathname === "/admin" || @@ -2393,6 +2394,11 @@ const server = Bun.serve({ // ── Bare-domain routing: rspace.online/{...} ── if (!subdomain && hostClean.includes("rspace.online")) { + // Top-level routes that must bypass module rewriting + if (url.pathname.startsWith("/rtasks/check/")) { + return app.fetch(req); + } + const pathSegments = url.pathname.split("/").filter(Boolean); if (pathSegments.length >= 1) { const firstSegment = pathSegments[0].toLowerCase();