chore: treat missing source ip as non-private for open-task external classification
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 8s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 8s
This commit is contained in:
@@ -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.")) {
|
||||
|
||||
Reference in New Issue
Block a user