diff --git a/proxy.ts b/proxy.ts index 4db0f4885..33e414282 100644 --- a/proxy.ts +++ b/proxy.ts @@ -72,6 +72,13 @@ export async function proxy(request: NextRequest) { return NextResponse.next(); } + // three.js KTX2/Basis transcoder assets are public runtime dependencies used + // by the in-browser 3D viewer. Redirecting them to login breaks texture decode + // and leaves generated 3D models as white clay renders. + if (pathname.startsWith("/three/basis/")) { + return NextResponse.next(); + } + // 🛡️ 安全检查3:速率限制 // 对API路径应用速率限制 if (pathname === "/api/chat") { @@ -299,6 +306,6 @@ export const config = { * - favicon.ico (favicon文件) * - public 文件夹中的文件 */ - "/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", + "/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|js|wasm)$).*)", ], };