mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 02:59:35 +00:00
feat: integrate Pi backend and Pi Web
This commit is contained in:
@@ -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*" };
|
||||
Reference in New Issue
Block a user