mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## Summary Propagate `maxDuration` to Edge adapter outputs so deployment adapters receive the same route execution limit metadata as Node.js outputs. Normalize Pages Router Edge adapter pathnames that end in `/index` to their public route pathname, for example `/edge-pages/index` to `/edge-pages`. This matters because the functions config manifest stores route metadata under the public pathname, so matching the unnormalized `/index` form would miss `maxDuration`. Add adapter coverage for App Router pages and routes, Pages Router pages and API routes, and both Node.js and Edge runtimes, including the Pages Router `/index` normalization case. ## Verification - `pnpm test-start-turbo test/production/adapter-config/adapter-config.test.ts` - `pnpm test-start-webpack test/production/adapter-config/adapter-config.test.ts` <!-- NEXT_JS_LLM_PR -->
11 lines
247 B
TypeScript
11 lines
247 B
TypeScript
import { NextApiRequest, NextApiResponse } from 'next/dist/types'
|
|
|
|
export const config = {
|
|
maxDuration: 70,
|
|
}
|
|
|
|
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
|
console.log(req.url)
|
|
res.json({ now: Date.now() })
|
|
}
|