demarches-normaliennes/config/initializers/rack_attack_request.rb
2019-08-20 13:29:29 +02:00

7 lines
156 B
Ruby

class Rack::Attack
class Request < ::Rack::Request
def remote_ip
@remote_ip ||= (env['action_dispatch.remote_ip'] || ip).to_s
end
end
end