From 47e1009ee0a7b4b4a15adb3c561ce4706b590981 Mon Sep 17 00:00:00 2001 From: 134 Date: Mon, 12 Oct 2026 08:09:54 +0800 Subject: [PATCH] fix(images): allow capability preview reads through the access proxy --- proxy.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/proxy.ts b/proxy.ts index 35559bc31..3f2899627 100644 --- a/proxy.ts +++ b/proxy.ts @@ -826,6 +826,15 @@ export async function proxy(request: NextRequest, event: NextFetchEvent) { return NextResponse.next(); } + // Generated inline previews use an unguessable image key, like signed provider URLs. + // Reference-image services need to read the image before background storage finishes. + if ( + (request.method === "GET" || request.method === "HEAD") && + /^\/api\/generated-image-preview\/[a-f0-9]{64}$/.test(pathname) + ) { + return NextResponse.next(); + } + // 允许匿名访问新版首页灵感数据 if (pathname === "/api/featured" || pathname.startsWith("/api/featured/")) { return NextResponse.next();