Files
Zack TannerandGitHub b2ce9dd9c3 tweak middlewareClientMaxBodySize handling (#84712)
This ensures we captured `middlewareClientMaxBodySize` in the config
schema and rather than triggering a hard error, it will buffer up to the
limit.
2025-10-09 17:10:41 -07:00

16 lines
351 B
TypeScript

import { NextRequest, NextResponse } from 'next/server'
export async function POST(request: NextRequest) {
const body = await request.text()
return new NextResponse(
JSON.stringify({
message: 'Hello World',
bodySize: body.length,
}),
{
status: 200,
headers: { 'Content-Type': 'application/json' },
}
)
}