aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/best_standards_support.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
index df8f7766bb..69adcc419f 100644
--- a/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
+++ b/actionpack/lib/action_dispatch/middleware/best_standards_support.rb
@@ -1,12 +1,21 @@
module ActionDispatch
class BestStandardsSupport
- def initialize(app)
+ 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"] = "IE=Edge,chrome=1"
+ headers["X-UA-Compatible"] = @header
[status, headers, body]
end
end