diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/default_middleware_stack.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/railties/lib/rails/application/default_middleware_stack.rb b/railties/lib/rails/application/default_middleware_stack.rb index 370c906086..570ff02c83 100644 --- a/railties/lib/rails/application/default_middleware_stack.rb +++ b/railties/lib/rails/application/default_middleware_stack.rb @@ -20,9 +20,7 @@ module Rails middleware.use ::ActionDispatch::SSL, config.ssl_options end - if config.action_dispatch.x_sendfile_header.present? - middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header - end + middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header if config.serve_static_assets middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control |