Skip to content

Commit

Permalink
feat: test ip country availability
Browse files Browse the repository at this point in the history
  • Loading branch information
KagamiChan committed Sep 29, 2024
1 parent cb8519b commit d61ebf7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/(api)/status/route.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export const GET = async () => {
return Response.json({ message: 'poi poi poi!' })
export const runtime = 'edge'

export const GET = async (request: Request) => {
const ipCountry = request.headers.get('CF-IPCountry')
return Response.json({ message: 'poi poi poi!', country: ipCountry })
}

0 comments on commit d61ebf7

Please sign in to comment.