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
This commit is contained in:
Javi Martín
2024-03-28 22:21:29 +01:00
parent 077faa2ad0
commit 77977bd8fe

View File

@@ -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`.