From 65b25e7ef3883695126228a3f98f3efdab07ef60 Mon Sep 17 00:00:00 2001 From: thehrz Date: Sat, 17 Aug 2024 00:03:24 +0800 Subject: [PATCH] pref: update myip api --- src/app/api/myip/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/myip/route.ts b/src/app/api/myip/route.ts index 188c997..6e8020b 100644 --- a/src/app/api/myip/route.ts +++ b/src/app/api/myip/route.ts @@ -1,5 +1,5 @@ -import { NextRequest, NextResponse } from "next/server" +import { NextRequest, NextResponse } from "next/server"; export async function GET(request: NextRequest) { - return NextResponse.json(request.ip + "") + return NextResponse.json(request.headers.get('X-Forwarded-For')) } \ No newline at end of file