diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-06-15 12:54:26 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-06-21 07:17:14 +0900 |
commit | ddb6d788d6a611fd1ba6cf92ad6d1342079517a8 (patch) | |
tree | ce404d935851ec89e426e7538067276cc5a7e885 /guides | |
parent | 3218459c28737071fe4424cd375c1b06a5c317df (diff) | |
download | rails-ddb6d788d6a611fd1ba6cf92ad6d1342079517a8.tar.gz rails-ddb6d788d6a611fd1ba6cf92ad6d1342079517a8.tar.bz2 rails-ddb6d788d6a611fd1ba6cf92ad6d1342079517a8.zip |
Make `ActionDispatch::Response#content_type` behavior configurable
I changed return value of `ActionDispatch::Response#content_type` in #36034.
But this change seems to an obstacle to upgrading. https://github.com/rails/rails/pull/36034#issuecomment-498795893
Therefore, I restored the behavior of `ActionDispatch::Response#content_type`
to 5.2 and deprecated old behavior. Also, made it possible to control the
behavior with the config.
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/configuring.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index b0bfe72741..ffff9417b9 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -553,6 +553,10 @@ Defaults to `'signed cookie'`. Any exceptions that are not configured will be mapped to 500 Internal Server Error. +* `config.action_dispatch.return_only_media_type_on_content_type` change the + return value of `ActionDispatch::Response#content_type` to the Content-Type + header without modification. Defaults to `false`. + * `ActionDispatch::Callbacks.before` takes a block of code to run before the request. * `ActionDispatch::Callbacks.after` takes a block of code to run after the request. @@ -908,6 +912,7 @@ text/javascript image/svg+xml application/postscript application/x-shockwave-fla - `config.autoloader`: `:zeitwerk` - `config.action_view.default_enforce_utf8`: `false` - `config.action_dispatch.use_cookies_with_metadata`: `true` +- `config.action_dispatch.return_only_media_type_on_content_type`: `false` - `config.action_mailer.delivery_job`: `"ActionMailer::MailDeliveryJob"` - `config.active_job.return_false_on_aborted_enqueue`: `true` - `config.active_storage.queues.analysis`: `:active_storage_analysis` |