diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/tasks/misc.rake | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 8631a5df3e..b923fedab7 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -147,6 +147,9 @@ module Rails def default_middleware_stack ActionDispatch::MiddlewareStack.new.tap do |middleware| + require "action_dispatch/http/rack_cache" if config.action_dispatch.rack_cache + + middleware.use ::Rack::Cache, config.action_dispatch.rack_cache if config.action_dispatch.rack_cache middleware.use ::ActionDispatch::Static, config.static_asset_paths if config.serve_static_assets middleware.use ::Rack::Lock if !config.allow_concurrency middleware.use ::Rack::Runtime diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 477bbbc1e7..f9f06299a0 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -23,6 +23,7 @@ module Rails @session_options = {} @time_zone = "UTC" @middleware = app_middleware + @asset_path = '/' end def asset_path=(value) diff --git a/railties/lib/rails/tasks/misc.rake b/railties/lib/rails/tasks/misc.rake index c6c22d83bf..e505b8c338 100644 --- a/railties/lib/rails/tasks/misc.rake +++ b/railties/lib/rails/tasks/misc.rake @@ -7,7 +7,7 @@ task :rails_env do end end -desc 'Generate a crytographically secure secret key (this is typically used to generate a secret for cookie sessions).' +desc 'Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions).' task :secret do require 'active_support/secure_random' puts ActiveSupport::SecureRandom.hex(64) |