From 00a5dc921a8fa5edd781d09357763112fc9c355f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 5 Sep 2020 18:34:37 +0200 Subject: [PATCH] Enable SHA1 digests This is enabled by default in Rails 5.2 applications. Note this change will cause all fragment caching to expire. We consider it acceptable considering the page where caching is most important (stats) is barely affected by this change, since this change only affects the view, and the time-consuming operations are cached in the model. Comments are actually affected, though, and pages with thousands of comments might take a few extra seconds to load the first time they're accessed after this change. We don't think this is going to be an issue on existing CONSUL installations. --- config/initializers/new_framework_defaults_5_2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/new_framework_defaults_5_2.rb b/config/initializers/new_framework_defaults_5_2.rb index 686b6fd4e..893bd860f 100644 --- a/config/initializers/new_framework_defaults_5_2.rb +++ b/config/initializers/new_framework_defaults_5_2.rb @@ -28,7 +28,7 @@ Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = t Rails.application.config.action_controller.default_protect_from_forgery = true # Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header. -# Rails.application.config.active_support.use_sha1_digests = true +Rails.application.config.active_support.use_sha1_digests = true # Make `form_with` generate id attributes for any generated HTML tags. Rails.application.config.action_view.form_with_generates_ids = true