diff --git a/app/api/v1/geo/route.ts b/app/api/v1/geo/route.ts index 23b06a0..3c3cdd4 100644 --- a/app/api/v1/geo/route.ts +++ b/app/api/v1/geo/route.ts @@ -1,13 +1,9 @@ -import { getClientGeolocation, getIpInfo } from "@/lib/geo"; +import { getIpInfo } from "@/lib/geo"; export async function GET(req: Request) { try { const data = await getIpInfo(req); - const geo = await getClientGeolocation(data.ip); - - console.log("[ClientGeolocation]", geo); - return Response.json({ ip: data.ip, city: data.city, diff --git a/middleware.ts b/middleware.ts index 4fc9293..5414cc0 100644 --- a/middleware.ts +++ b/middleware.ts @@ -4,12 +4,7 @@ import { auth } from "auth"; import { NextAuthRequest } from "next-auth/lib"; import { siteConfig } from "./config/site"; -import { - extractRealIP, - getClientGeolocation, - getGeolocation, - getUserAgent, -} from "./lib/geo"; +import { extractRealIP, getGeolocation, getUserAgent } from "./lib/geo"; export const config = { matcher: ["/((?!api|_next/static|_next/image|favicon.ico).*)"], @@ -39,9 +34,6 @@ async function handleShortUrl(req: NextAuthRequest) { const geo = await getGeolocation(req, ip || "::1"); - const test_geo = await getClientGeolocation(ip); - console.log("[ClientGeolocation]", test_geo); - const url = new URL(req.url); const password = url.searchParams.get("password") || "";