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.0.4 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.4.rc1 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.3 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.2 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.1 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.0 lib/action_dispatch/middleware/best_standards_support.rb
actionpack-3.0.0.rc2 lib/action_dispatch/middleware/best_standards_support.rb