next.js/test/e2e/app-dir/app-routes-trailing-slash/handler.ts
handler.ts10 lines225 B
import { NextRequest, NextResponse } from 'next/server'

export const GET = (req: NextRequest) => {
  const url = new URL(req.url)
  return NextResponse.json({
    url: url.pathname,
    nextUrl: req.nextUrl.pathname,
  })
}
Quest for Codev2.0.0
/
SIGN IN