From 7f48e18034b4349a14a66dda7e61c048248fd890 Mon Sep 17 00:00:00 2001 From: OG T Date: Sun, 7 Jun 2026 16:10:02 +0800 Subject: [PATCH] chore: treat missing source ip as non-private for open-task external classification --- apps/web/src/app/api/open-tasks/route.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/api/open-tasks/route.ts b/apps/web/src/app/api/open-tasks/route.ts index 84b51a6..2a1d1ce 100644 --- a/apps/web/src/app/api/open-tasks/route.ts +++ b/apps/web/src/app/api/open-tasks/route.ts @@ -52,8 +52,11 @@ function resolveSourceIp(request: Request) { function isPrivateIp(ip: string | undefined) { if (!ip) return false; const normalized = ip.trim().toLowerCase(); - if (!normalized || normalized === "unknown" || normalized === "::1" || normalized === "localhost") { - return true; + if (!normalized) { + return false; + } + if (normalized === "::1" || normalized === "localhost") { + return false; } if (normalized.startsWith("127.") || normalized.startsWith("10.") || normalized.startsWith("192.168.")) {