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.10.0 lib/katello/prevent_json_parsing.rb
katello-4.9.2 lib/katello/prevent_json_parsing.rb
katello-4.10.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.10.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.8.4 lib/katello/prevent_json_parsing.rb
katello-4.9.1 lib/katello/prevent_json_parsing.rb
katello-4.8.3 lib/katello/prevent_json_parsing.rb
katello-4.9.0 lib/katello/prevent_json_parsing.rb
katello-4.7.6 lib/katello/prevent_json_parsing.rb
katello-4.8.2 lib/katello/prevent_json_parsing.rb
katello-4.9.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.9.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.8.1 lib/katello/prevent_json_parsing.rb
katello-4.7.5 lib/katello/prevent_json_parsing.rb
katello-4.8.0 lib/katello/prevent_json_parsing.rb
katello-4.8.0.rc2 lib/katello/prevent_json_parsing.rb
katello-4.7.4 lib/katello/prevent_json_parsing.rb
katello-4.8.0.rc1 lib/katello/prevent_json_parsing.rb
katello-4.7.3 lib/katello/prevent_json_parsing.rb
katello-4.7.2 lib/katello/prevent_json_parsing.rb