diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb deleted file mode 100644 index 5a6a32d37..000000000 --- a/config/initializers/cookies_serializer.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Specify a serializer for the signed and encrypted cookie jars. -# Valid options are :json, :marshal, and :hybrid. -Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb index cbd23a7ce..488587cfe 100644 --- a/config/initializers/new_framework_defaults_7_0.rb +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -97,26 +97,9 @@ Rails.application.config.action_dispatch.default_headers = { # If you're upgrading and haven't set `cookies_serializer` previously, your cookie serializer # is `:marshal`. The default for new apps is `:json`. # -# Rails.application.config.action_dispatch.cookies_serializer = :json -# -# -# To migrate an existing application to the `:json` serializer, use the `:hybrid` option. -# -# Rails transparently deserializes existing (Marshal-serialized) cookies on read and -# re-writes them in the JSON format. -# -# It is fine to use `:hybrid` long term; you should do that until you're confident *all* your cookies -# have been converted to JSON. To keep using `:hybrid` long term, move this config to its own -# initializer or to `config/application.rb`. -# -# Rails.application.config.action_dispatch.cookies_serializer = :hybrid -# -# -# If your cookies can't yet be serialized to JSON, keep using `:marshal` for backward-compatibility. -# # If you have configured the serializer elsewhere, you can remove this section of the file. # -# See https://guides.rubyonrails.org/action_controller_overview.html#cookies for more information. +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