Fix /rtasks/check/:token 404 — bypass module rewriting for checklist routes
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 <noreply@anthropic.com>
This commit is contained in:
parent
8cf069f2b7
commit
aabc2de7d8
|
|
@ -2325,6 +2325,7 @@ const server = Bun.serve<WSData>({
|
||||||
url.pathname.startsWith("/api/") ||
|
url.pathname.startsWith("/api/") ||
|
||||||
url.pathname.startsWith("/data/") ||
|
url.pathname.startsWith("/data/") ||
|
||||||
url.pathname.startsWith("/encryptid/") ||
|
url.pathname.startsWith("/encryptid/") ||
|
||||||
|
url.pathname.startsWith("/rtasks/check/") ||
|
||||||
url.pathname.startsWith("/.well-known/") ||
|
url.pathname.startsWith("/.well-known/") ||
|
||||||
url.pathname === "/about" ||
|
url.pathname === "/about" ||
|
||||||
url.pathname === "/admin" ||
|
url.pathname === "/admin" ||
|
||||||
|
|
@ -2393,6 +2394,11 @@ const server = Bun.serve<WSData>({
|
||||||
|
|
||||||
// ── Bare-domain routing: rspace.online/{...} ──
|
// ── Bare-domain routing: rspace.online/{...} ──
|
||||||
if (!subdomain && hostClean.includes("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);
|
const pathSegments = url.pathname.split("/").filter(Boolean);
|
||||||
if (pathSegments.length >= 1) {
|
if (pathSegments.length >= 1) {
|
||||||
const firstSegment = pathSegments[0].toLowerCase();
|
const firstSegment = pathSegments[0].toLowerCase();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue