Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9669aa7cf1
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (26 sloc) 0.61 kB
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)
if headers["X-UA-Compatible"] && @header
unless headers["X-UA-Compatible"][@header]
headers["X-UA-Compatible"] << "," << @header.to_s
end
else
headers["X-UA-Compatible"] = @header
end
[status, headers, body]
end
end
end
Jump to Line
Something went wrong with that request. Please try again.