Skip to content
Snippets Groups Projects
Commit 61aee000 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

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

parent 67befe54
No related branches found
No related tags found
No related merge requests found
module Rack
class Request
def trusted_proxy?(ip)
Rails.application.config.action_dispatch.trusted_proxies.any? { |proxy| proxy === ip }
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment