Sha256: 5d908c5577992673b70865b35266149fec2d69773041dafd696b124fe861e665
Contents?: true
Size: 293 Bytes
Versions: 2
Compression:
Stored size: 293 Bytes
Contents
module RackStripClientIp class Middleware def initialize(app) @app = app end def call(env) @app.call(strip_client_ip_header(env)) end private def strip_client_ip_header(env) env.reject {|key, _| key.upcase == "HTTP_CLIENT_IP" } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rack_strip_client_ip-0.0.2 | lib/rack_strip_client_ip/middleware.rb |
rack_strip_client_ip-0.0.1 | lib/rack_strip_client_ip/middleware.rb |