Sha256: bcf9274f88b623742f747385dc87ce0cbc02441463964c22a4d41025cf231986
Contents?: true
Size: 546 Bytes
Versions: 34
Compression:
Stored size: 546 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
34 entries across 34 versions & 1 rubygems