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.
This commit is contained in:
Javi Martín
2020-09-05 18:34:37 +02:00
parent 6756a88815
commit 00a5dc921a

View File

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