fix: allow basis transcoder assets for 3d textures
This commit is contained in:
parent
1c935bf7ae
commit
95572bd476
9
proxy.ts
9
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)$).*)",
|
||||
],
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user