Set hash_digest_class to SHA256 (#18364)

This commit is contained in:
Mac Siri 2023-07-06 17:38:56 -04:00 committed by GitHub
parent f88e18c2de
commit cd9d5df963
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -45,9 +45,6 @@ module PracticalDeveloper
config.action_view.default_enforce_utf8 = true
## Rails 6.1
# This replaces the old config.active_support.use_sha1_digests from Rails 5.2
config.active_support.hash_digest_class = ::Digest::MD5 # New default is ::Digest::SHA1
# Make `form_with` generate non-remote forms by default. We want this to be true as it was the default in 5.2
config.action_view.form_with_generates_remote_forms = true

View file

@ -28,7 +28,7 @@ Rails.application.config.action_view.apply_stylesheet_media_default = false
# Change the digest class for ActiveSupport::Digest.
# Changing this default means that for example Etags change and
# various cache keys leading to cache invalidation.
# Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256
Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256
# Don't override ActiveSupport::TimeWithZone.name and use the default Ruby
# implementation.