Sha256: 42215495445acabafd12867a7776c34c6489aa0f824f0d1076ebb0019c0877d6

Contents?: true

Size: 303 Bytes

Versions: 1

Compression:

Stored size: 303 Bytes

Contents

module IpAnonymizer
  class MaskIp
    def initialize(app)
      @app = app
    end

    def call(env)
      req = ActionDispatch::Request.new(env)
      # TODO lazy load, like ActionDispatch::RemoteIp
      req.remote_ip = IpAnonymizer.mask_ip(req.remote_ip)
      @app.call(req.env)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ip_anonymizer-0.1.0 lib/ip_anonymizer/mask_ip.rb