diff --git a/config/initializers/trusted_proxies.rb b/config/initializers/trusted_proxies.rb index 27e9ee0396..3c2afd8cdb 100644 --- a/config/initializers/trusted_proxies.rb +++ b/config/initializers/trusted_proxies.rb @@ -1,7 +1,11 @@ module Rack class Request def trusted_proxy?(ip) - Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip } + if Rails.application.config.action_dispatch.trusted_proxies.nil? + super + else + Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip } + end end end end