From 94f9c31a72b3a7f5947d1664c58645fb105d6261 Mon Sep 17 00:00:00 2001 From: thetizzo Date: Thu, 26 Jul 2018 14:04:14 -0600 Subject: Update Rails 3.2 to 4.0 upgrade guide to include a mention and tip for handling the addition of configurable default HTTP headers. [ci skip] --- guides/source/upgrading_ruby_on_rails.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'guides') diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index e3a254f82b..319bc09be3 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -1356,6 +1356,17 @@ config.middleware.insert_before(Rack::Lock, ActionDispatch::BestStandardsSupport Also check your environment settings for `config.action_dispatch.best_standards_support` and remove it if present. +* Rails 4.0 allows configuration of HTTP headers by setting `config.action_dispatch.default_headers`. The defaults are as follows: + +```ruby + config.action_dispatch.default_headers = { + 'X-Frame-Options' => 'SAMEORIGIN', + 'X-XSS-Protection' => '1; mode=block' + } +``` + +Please note that if your application is dependent on loading certain pages in a `` or `