next.js/test/e2e/app-dir/app-routes/app/hooks/headers/route.ts
route.ts15 lines356 B
import { headers } from 'next/headers'
import { getRequestMeta, withRequestMeta } from '../../../helpers'

export async function GET() {
  const h = await headers()

  // Put the request meta in the response directly as meta again.
  const meta = getRequestMeta(h)

  return new Response(null, {
    status: 200,
    headers: withRequestMeta(meta),
  })
}
Quest for Codev2.0.0
/
SIGN IN