feat: integrate Pi backend and Pi Web

This commit is contained in:
luckyyzh
2026-07-30 19:37:53 +08:00
commit 7392ab9dd7
1390 changed files with 337197 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import { NextResponse, type NextRequest } from "next/server";
import { isApiRequestAllowed } from "@/lib/request-security";
export function proxy(request: NextRequest) {
if (!isApiRequestAllowed(request)) {
return NextResponse.json({ error: "Untrusted API request" }, { status: 403 });
}
return NextResponse.next();
}
export const config = { matcher: "/api/:path*" };