diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-06-11 21:45:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 21:45:35 +0200 |
commit | 6d402c6bfab53489eaee57be4887725420588776 (patch) | |
tree | a518c964b678e7971f9f94225aea66d340fab891 /activesupport/lib/active_support/railtie.rb | |
parent | 722a8b938dc573fc5557b6237a29d373e7f45c92 (diff) | |
parent | 7440bf44baea53de950093ebf9ee4e8a3ed71066 (diff) | |
download | rails-6d402c6bfab53489eaee57be4887725420588776.tar.gz rails-6d402c6bfab53489eaee57be4887725420588776.tar.bz2 rails-6d402c6bfab53489eaee57be4887725420588776.zip |
Merge pull request #29263 from assain/default_message_encryptor_to_gcm
Default Message Encryptor Cipher to AES-256-GCM From AES-256-CBC
Diffstat (limited to 'activesupport/lib/active_support/railtie.rb')
-rw-r--r-- | activesupport/lib/active_support/railtie.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index af1d5bd615..45bc51311b 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -7,6 +7,13 @@ module ActiveSupport config.eager_load_namespaces << ActiveSupport + initializer "active_support.set_authenticated_message_encryption" do |app| + if app.config.active_support.respond_to?(:use_authenticated_message_encryption) + ActiveSupport::MessageEncryptor.use_authenticated_message_encryption = + app.config.active_support.use_authenticated_message_encryption + end + end + initializer "active_support.reset_all_current_attributes_instances" do |app| app.reloader.before_class_unload { ActiveSupport::CurrentAttributes.clear_all } app.executor.to_run { ActiveSupport::CurrentAttributes.reset_all } |