diff options
author | Eugen <eugen@zeonfederated.com> | 2017-01-22 23:07:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-22 23:07:31 +0100 |
commit | 956da43e19e484f94df91f715e4a88794a25dbec (patch) | |
tree | a393d0f3d3bf9eba25b2dd0ec795736063d435d3 /config/initializers | |
parent | cea9fb31fefbe3723669082650f32956fabd5123 (diff) |
Fix error
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/trusted_proxies.rb | 6 |
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 |