Sha256: 3713b97702c1c68360a45bbfe4524aaf269710e6e7ffad7e765794b0250f3acd
Contents?: true
Size: 543 Bytes
Versions: 6
Compression:
Stored size: 543 Bytes
Contents
require 'rack' module Rack module Rewritten class Record def initialize(app) @app = app end def call(env) req = Rack::Request.new(env.clone) status, headers, response = @app.call(env) puts '-> Rack::Rewritten::Record' puts headers.inspect if [200, 301, 302].include?(status) ::Rewritten.add_hit(req.path, status, headers['Content-Type']) if headers['Content-Type'] =~ /text\/html/ end [status, headers, response] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems