1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

fix(web-server): allow for trusted proxies not be set

هذا الالتزام موجود في:
Adam Cooke
2024-03-06 14:05:44 +00:00
الأصل d1e5b68200
التزام 4e1deb2d2a

عرض الملف

@@ -1,7 +1,7 @@
# frozen_string_literal: true
Rack::Request.ip_filter = lambda { |ip|
if Postal::Config.postal.trusted_proxies.any? { |net| net.include?(ip) } ||
if Postal::Config.postal.trusted_proxies&.any? { |net| net.include?(ip) } ||
ip.match(/\A127\.0\.0\.1\Z|\A::1\Z|\Afd[0-9a-f]{2}:.+|\Alocalhost\Z|\Aunix\Z|\Aunix:/i)
true
else