class Middleman::Extensions::AssetHash::Middleware
def call(env)
def call(env) status, headers, response = @rack_app.call(env) # We don't want to use this middleware when rendering files to figure out their hash! return [status, headers, response] if env['bypass_asset_hash'] == 'true' path = ::Middleman::Util.full_path(env['PATH_INFO'], @middleman_app) if path =~ /(^\/$)|(\.(htm|html|php|css|js)$)/ body = ::Middleman::Util.extract_response_text(response) if body status, headers, response = Rack::Response.new(rewrite_paths(body, path), status, headers).finish end end [status, headers, response] end