aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/upgrading_ruby_on_rails.md
diff options
context:
space:
mode:
authorthetizzo <j.m.taylor1@gmail.com>2018-07-26 14:04:14 -0600
committerthetizzo <j.m.taylor1@gmail.com>2018-08-03 13:18:19 -0600
commit94f9c31a72b3a7f5947d1664c58645fb105d6261 (patch)
tree7028025ef7e60cb05913c6130be9d40c9b503091 /guides/source/upgrading_ruby_on_rails.md
parent15a72c6c05cfc5250ee04742b4f45463f937d3f7 (diff)
downloadrails-94f9c31a72b3a7f5947d1664c58645fb105d6261.tar.gz
rails-94f9c31a72b3a7f5947d1664c58645fb105d6261.tar.bz2
rails-94f9c31a72b3a7f5947d1664c58645fb105d6261.zip
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]
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md11
1 files changed, 11 insertions, 0 deletions
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 `<frame>` or `<iframe>`, then you may need to explicitly set `X-Frame-Options` to `ALLOW-FROM ...` or `ALLOWALL`.
+
* In Rails 4.0, precompiling assets no longer automatically copies non-JS/CSS assets from `vendor/assets` and `lib/assets`. Rails application and engine developers should put these assets in `app/assets` or configure `config.assets.precompile`.
* In Rails 4.0, `ActionController::UnknownFormat` is raised when the action doesn't handle the request format. By default, the exception is handled by responding with 406 Not Acceptable, but you can override that now. In Rails 3, 406 Not Acceptable was always returned. No overrides.