From 956da43e19e484f94df91f715e4a88794a25dbec Mon Sep 17 00:00:00 2001 From: Eugen Date: Sun, 22 Jan 2017 23:07:31 +0100 Subject: Fix error --- config/initializers/trusted_proxies.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/initializers/trusted_proxies.rb b/config/initializers/trusted_proxies.rb index 27e9ee039..3c2afd8cd 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 -- cgit