Integration
Proxy background lifetime hook
Proxy can extend request-related task lifetime with waitUntil where the runtime supports it. Use bounded, noncritical work and handle rejection. It does not guarantee durable delivery or make background work an authorization boundary. Example context: isolated Next.js 16.x candidate; snippet is partial unless it defines a complete convention file. Lifecycle: documented. Expected behavior / verification: Verify actual supported runtime and lifecycle with a controlled completion task; no external telemetry or durable mutation is performed. Source: https://nextjs.org/docs/app/api-reference/file-conventions/proxy Exact installed signature, typecheck and framework execution not run.
Formal Syntax & Structure
nextjs syntaxnextjs
NextFetchEvent.waitUntil(promise) from next/serverWorking Example
Example Snippetnextjs
import {NextResponse,type NextRequest,type NextFetchEvent} from 'next/server'; export function proxy(_request:NextRequest,event:NextFetchEvent){event.waitUntil(Promise.resolve().then(()=>console.info('synthetic request')));return NextResponse.next()}