From 77977bd8fe586423d0a8cfdbf1f00d7f190d22d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 28 Mar 2024 22:21:29 +0100 Subject: [PATCH] Return Content-Type header without modification Setting it to `true` was deprecated in Rails 7.0 and the option was was removed in Rails 7.1, so in Rails 7.1 applications it isn't possible to set it to `true` [1]. So we're setting it to `false` now. [1] https://github.com/rails/rails/commit/689b27773 --- config/initializers/new_framework_defaults_7_0.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb index 488587cfe..092eab294 100644 --- a/config/initializers/new_framework_defaults_7_0.rb +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -102,7 +102,7 @@ Rails.application.config.action_dispatch.default_headers = { Rails.application.config.action_dispatch.cookies_serializer = :json # Change the return value of `ActionDispatch::Request#content_type` to the Content-Type header without modification. -# Rails.application.config.action_dispatch.return_only_request_media_type_on_content_type = false +Rails.application.config.action_dispatch.return_only_request_media_type_on_content_type = false # Active Storage `has_many_attached` relationships will default to replacing the current collection instead of appending to it. # Thus, to support submitting an empty collection, the `file_field` helper will render an hidden field `include_hidden` by default when `multiple_file_field_include_hidden` is set to `true`.