You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: middleware.rb
    path of file: ./repos/heavens_door/lib/heavens_door
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module HeavensDoor
  class Midd
    
    def call(env)
      status, headers, body = @app.call env

      if headers && headers['Content-Type']&.include?('text/html') &&
          (status / 100 != 3) &&  # redirections
          (!env['action_dispatch.content_security_policy']&.script_src('unsafe-inline') && !env['action_dispatch.content_security_policy']&.style_src('unsafe-inline'))  # the Rails default top page has this
        case body
        when ActionDispatch::Response, ActionDispatch::Response::RackBody
          body = body.body
        when Array
          body = body[0]
        end