From 55d4d3cd5cebe8d881acd772d63dc31869674cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 18 Sep 2021 01:54:55 +0200 Subject: [PATCH] Enable cookies with metadata This is the default encryption for cookies in Rails 6.0 applications. The reason it isn't enabled automatically for existing applications is these cookies are not compatible with running the application with Rails 5. Since this isn't our case, and existing cookies are still read correctly, we can safely enable it. --- config/initializers/new_framework_defaults_6_0.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_6_0.rb b/config/initializers/new_framework_defaults_6_0.rb index a43c39dc0..d5667abbf 100644 --- a/config/initializers/new_framework_defaults_6_0.rb +++ b/config/initializers/new_framework_defaults_6_0.rb @@ -14,7 +14,7 @@ Rails.application.config.action_view.default_enforce_utf8 = false # # This option is not backwards compatible with earlier Rails versions. # It's best enabled when your entire app is migrated and stable on 6.0. -# Rails.application.config.action_dispatch.use_cookies_with_metadata = true +Rails.application.config.action_dispatch.use_cookies_with_metadata = true # Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification. # Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false