Precompile filter parameters

This is done for performance reasons. Quoting the pull request
introducing this option [1]:

> A config might be overkill, but I wanted to provide an escape hatch
> for any upgraded apps that might be testing the exact value of the
> action_dispatch.parameter_filter header.

Since we don't test the exact value of action_dispatch.parameter_filter,
we can enable this option.

[1] Pull request 46452 in https://github.com/rails/rails
This commit is contained in:
Javi Martín
2024-04-15 16:06:31 +02:00
parent 529b4d2a98
commit 5ecd65b7dc

View File

@@ -171,7 +171,7 @@ Rails.application.config.active_record.belongs_to_required_validates_foreign_key
# Enable precompilation of `config.filter_parameters`. Precompilation can # Enable precompilation of `config.filter_parameters`. Precompilation can
# improve filtering performance, depending on the quantity and types of filters. # improve filtering performance, depending on the quantity and types of filters.
#++ #++
# Rails.application.config.precompile_filter_parameters = true Rails.application.config.precompile_filter_parameters = true
### ###
# Enable before_committed! callbacks on all enrolled records in a transaction. # Enable before_committed! callbacks on all enrolled records in a transaction.