Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Real 404s: the proxy checks every request for a record page (Next hides RSC requests from it)

Claudefe5245d3b5f8
diff --git a/src/proxy.ts b/src/proxy.ts
index 8b7c9d23..fd8877fb 100644
--- a/src/proxy.ts
+++ b/src/proxy.ts
@@ -13,17 +13,15 @@ const APP_IDS = new Set(APPS.map((a) => a.id));
* Let the request through — except a page for something that doesn't exist (an unknown app or hub
* mode, a project / canvas / channel… id that isn't stored), which gets a real 404. The page can't
* send one itself: the studio's loading.tsx streams the shell (with a 200) before the page knows
- * the id is unknown. Records are checked on document loads only: a client-side navigation (an RSC
- * request) gets the page's own notFound() in place, without a reload.
+ * the id is unknown. (The proxy can't tell a client-side navigation from a page load, so a link to
+ * a deleted id reloads into the same 404 page.)
*/
function pass(request: NextRequest): NextResponse {
const { pathname } = request.nextUrl;
const app = /^\/apps\/([^/]+)\/?$/.exec(pathname)?.[1];
if ((app && !APP_IDS.has(safeDecode(app))) || unknownHubMode(pathname)) return notFound(request);
- if (!request.headers.has("rsc")) {
- const record = recordForPath(pathname);
- if (record && !recordExists(record)) return notFound(request);
- }
+ const record = recordForPath(pathname);
+ if (record && !recordExists(record)) return notFound(request);
return NextResponse.next();
}
diff --git a/tests/e2e/composer-flows.mjs b/tests/e2e/composer-flows.mjs
index e3d8066a..65b8d372 100644
--- a/tests/e2e/composer-flows.mjs
+++ b/tests/e2e/composer-flows.mjs
@@ -163,7 +163,7 @@ async function ready(page, url) {
for (const route of [
"/image", "/edit", "/inpaint", "/video", "/lipsync", "/motion-control", "/reframe", "/extend", "/video-edit",
// /audio/translate is the Translate & dub studio (its own steps, no composer); no-horizontal-scroll.mjs covers it.
- "/upscale", "/upscale/video", "/audio", "/audio/dialogue", "/audio/voice-change", "/audio/sfx", "/audio/music", "/audio/video",
+ "/upscale", "/upscale/video", "/audio", "/audio/dialogue", "/audio/voice-change", "/audio/transcribe", "/audio/sfx", "/audio/music", "/audio/video",
"/video-tools", "/video-tools/relight", "/video-tools/depth", "/video-tools/join", "/video-tools/colors", "/apps/app-face-swap",
]) {
await ready(page, route);