mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Warn config.derive_keys will be true by default in 4.1
This commit is contained in:
parent
60609bb50d
commit
e272000c80
1 changed files with 17 additions and 9 deletions
|
@ -130,15 +130,23 @@ module Rails
|
||||||
# These parameters will be used by middlewares and engines to configure themselves
|
# These parameters will be used by middlewares and engines to configure themselves
|
||||||
#
|
#
|
||||||
def env_config
|
def env_config
|
||||||
@env_config ||= super.merge({
|
@env_config ||= begin
|
||||||
"action_dispatch.parameter_filter" => config.filter_parameters,
|
if config.secret_token_key.nil?
|
||||||
"action_dispatch.secret_token" => config.secret_token,
|
ActiveSupport::Deprecation.warn "You didn't set config.secret_token_key. " +
|
||||||
"action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions,
|
"This should be used instead of the old deprecated config.secret_token. " +
|
||||||
"action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local,
|
"Set config.secret_token_key instead of config.secret_token in config/initializers/secret_token.rb"
|
||||||
"action_dispatch.logger" => Rails.logger,
|
end
|
||||||
"action_dispatch.backtrace_cleaner" => Rails.backtrace_cleaner,
|
|
||||||
"action_dispatch.key_generator" => key_generator
|
super.merge({
|
||||||
})
|
"action_dispatch.parameter_filter" => config.filter_parameters,
|
||||||
|
"action_dispatch.secret_token" => config.secret_token,
|
||||||
|
"action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions,
|
||||||
|
"action_dispatch.show_detailed_exceptions" => config.consider_all_requests_local,
|
||||||
|
"action_dispatch.logger" => Rails.logger,
|
||||||
|
"action_dispatch.backtrace_cleaner" => Rails.backtrace_cleaner,
|
||||||
|
"action_dispatch.key_generator" => key_generator
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
## Rails internal API
|
## Rails internal API
|
||||||
|
|
Loading…
Reference in a new issue