mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### Why? When running next-upgrade, `next-request-geo-ip` requires to install `@vercel/functions` and `built-in-next-font` makes `@next/font` no longer needed. We added a prompt to ask user whether to (un)install it at https://github.com/vercel/next.js/pull/71038 but it prompts even if there were no transform occurred. This is unnecessary layer so we only prompt when there's a change caused from the codemod. ### No Modification https://github.com/user-attachments/assets/3acfdb24-c8e7-4189-9c81-4765ce748822 ### With Modification https://github.com/user-attachments/assets/f44a8b1c-c75a-4446-afc8-f74111de939d ---------
9 lines
213 B
TypeScript
9 lines
213 B
TypeScript
// @ts-nocheck
|
|
import { type NextRequest, NextResponse } from 'next/server'
|
|
|
|
export function GET(request: NextRequest) {
|
|
const geo = request.geo
|
|
const ip = request.ip
|
|
return NextResponse.json({ geo, ip })
|
|
}
|