مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
don't bother looking up local IPs
هذا الالتزام موجود في:
@@ -117,7 +117,7 @@ module Postal
|
||||
# We know this IP isn't valid. We don't need to do anything
|
||||
else
|
||||
# We need to look this up
|
||||
if ip_address = IPAddress.where("ipv4 = ? OR ipv6 = ?", ip, ip).first
|
||||
if !self.class.local_ip?(ip) && ip_address = IPAddress.where("ipv4 = ? OR ipv6 = ?", ip, ip).first
|
||||
@pairs[ip_address.ipv4] = ip_address.ipv6
|
||||
@ip_to_id_mapping[ip] = ip_address.id
|
||||
need = id
|
||||
@@ -178,5 +178,9 @@ module Postal
|
||||
end
|
||||
end
|
||||
|
||||
def self.local_ip?(ip)
|
||||
!!(ip =~ /\A(127\.|fe80:|::)/)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم