Override Rack::Request to use the same trusted proxy settings as Rails

main
Eugen Rochko 8 years ago
parent 67befe5463
commit 61aee0006e

@ -0,0 +1,7 @@
module Rack
class Request
def trusted_proxy?(ip)
Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip }
end
end
end
Loading…
Cancel
Save