class DataStyleSanitizer::Middleware

def call(env)

def call(env)
  status, headers, response = @app.call(env)
  if html_response?(headers)
    body = +""
    response.each { |part| body << part }
    nonce = extract_nonce_from_env(env)
    processed = Processor.new(body, nonce: nonce).process
    headers["Content-Length"] = processed.bytesize.to_s
    [status, headers, [processed]]
  else
    [status, headers, response]
  end
end