Sha256: 8c70d14d3c6cbdb0c7dfd7e98a24ab2e69560d656dfaf13590199cf2d1bbf6eb

Contents?: true

Size: 265 Bytes

Versions: 134

Compression:

Stored size: 265 Bytes

Contents

module Katello
  class PreventJsonParsing
    def initialize(app, exclude)
      @app = app
      @exclude = exclude
    end

    def call(env)
      if @exclude&.call(env)
        env['CONTENT_TYPE'] = 'text/plain'
      end
      @app.call(env)
    end
  end
end

Version data entries

134 entries across 134 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.15.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.14.1 lib/katello/prevent_json_parsing.rb
katello-4.14.0 lib/katello/prevent_json_parsing.rb
katello-4.14.0.rc3 lib/katello/prevent_json_parsing.rb
katello-4.14.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.14.0.rc1.1 lib/katello/prevent_json_parsing.rb
katello-4.14.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.13.1 lib/katello/prevent_json_parsing.rb
katello-4.13.0 lib/katello/prevent_json_parsing.rb
katello-4.12.1 lib/katello/prevent_json_parsing.rb
katello-4.13.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.12.0 lib/katello/prevent_json_parsing.rb
katello-4.12.0.rc3 lib/katello/prevent_json_parsing.rb
katello-4.12.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.12.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.11.1 lib/katello/prevent_json_parsing.rb
katello-4.11.0 lib/katello/prevent_json_parsing.rb
katello-4.11.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.11.0.rc1 lib/katello/prevent_json_parsing.rb