about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen <eugen@zeonfederated.com>2017-01-22 23:07:31 +0100
committerGitHub <noreply@github.com>2017-01-22 23:07:31 +0100
commit956da43e19e484f94df91f715e4a88794a25dbec (patch)
treea393d0f3d3bf9eba25b2dd0ec795736063d435d3 /config
parentcea9fb31fefbe3723669082650f32956fabd5123 (diff)
Fix error
Diffstat (limited to 'config')
-rw-r--r--config/initializers/trusted_proxies.rb6
1 files changed, 5 insertions, 1 deletions
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