diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-11-08 10:00:48 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-11-08 10:10:24 +0100 |
| commit | 25ee6490e4e29a69b736ea95a2b198fcc7f98751 (patch) | |
| tree | d0af905b76e0ba36447ddb8889da8d4422b3483c /config/initializers | |
| parent | 7260bdfbee719a93ffe6752ff08c3a77bc198b2d (diff) | |
| download | operum-25ee6490e4e29a69b736ea95a2b198fcc7f98751.tar.gz operum-25ee6490e4e29a69b736ea95a2b198fcc7f98751.zip | |
Upgrade to Rails 8
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'config/initializers')
| -rw-r--r-- | config/initializers/assets.rb | 5 | ||||
| -rw-r--r-- | config/initializers/filter_parameter_logging.rb | 9 | ||||
| -rw-r--r-- | config/initializers/new_framework_defaults_8_0.rb | 33 |
3 files changed, 37 insertions, 10 deletions
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index bcafccd..019d0bb 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -7,8 +7,3 @@ Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path - -# Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in the app/assets -# folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 7231487..a0fdfc4 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -2,10 +2,9 @@ # Be sure to restart your server when you modify this file. -# Configure parameters to be partially matched (e.g. passw matches password) and -# filtered from the log file. Use this to limit dissemination of sensitive -# information. See the ActiveSupport::ParameterFilter documentation for -# supported notations and behaviors. +# Configure parameters to be partially matched (e.g. passw matches password) and filtered +# from the log file. Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += %i[ - passw secret token _key crypt salt certificate otp ssn + passw email secret token _key crypt salt certificate otp ssn cvv cvc ] diff --git a/config/initializers/new_framework_defaults_8_0.rb b/config/initializers/new_framework_defaults_8_0.rb new file mode 100644 index 0000000..0ca4b07 --- /dev/null +++ b/config/initializers/new_framework_defaults_8_0.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 8.0 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `8.0`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +### +# Specifies whether `to_time` methods preserve the UTC offset of their receivers or preserves +# the timezone. +# If set to `:zone`, `to_time` methods will use the timezone of their receivers. +# If set to `:offset`, `to_time` methods will use the UTC offset. +# If `false`, `to_time` methods will convert to the local system UTC offset instead. +#++ +Rails.application.config.active_support.to_time_preserves_timezone = :zone + +### +# When both `If-Modified-Since` and `If-None-Match` are provided by the client +# only consider `If-None-Match` as specified by RFC 7232 Section 6. +# If set to `false` both conditions need to be satisfied. +#++ +Rails.application.config.action_dispatch.strict_freshness = true + +### +# Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks. +#++ +Regexp.timeout = 1 |
