Sha256: e4967dcbcfbb3a5f5516371df84fbac9cb5e2ec9fba9381c6966f8cf7777764c

Contents?: true

Size: 415 Bytes

Versions: 187

Compression:

Stored size: 415 Bytes

Contents

module ActionDispatch
  class BestStandardsSupport
    def initialize(app, type = true)
      @app = app

      @header = case type
      when true
        "IE=Edge,chrome=1"
      when :builtin
        "IE=Edge"
      when false
        nil
      end
    end

    def call(env)
      status, headers, body = @app.call(env)
      headers["X-UA-Compatible"] = @header
      [status, headers, body]
    end
  end
end

Version data entries

187 entries across 151 versions & 16 rubygems

Version Path
actionpack-3.2.4 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.1.5 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.13 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.2.4.rc1 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.1.5.rc1 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.13.rc1 lib/action_dispatch/middleware/best_standards_support.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb
rails-uploader-0.0.1 vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.6.0 vendor/bundle/gems/actionpack-3.2.1/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.6.0 vendor/bundle/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.6.0 vendor/bundle/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.5.4 vendor/bundle/gems/actionpack-3.2.1/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.5.4 vendor/bundle/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.2.3 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.2.3.rc2 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.2.3.rc1 lib/action_dispatch/middleware/best_standards_support.rb
challah-0.5.3 vendor/bundle/gems/actionpack-3.2.1/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.5.3 vendor/bundle/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb
challah-0.5.2 vendor/bundle/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb