diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2013-07-15 01:19:36 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2013-07-15 01:20:49 -0300 |
commit | 207fa5c11ddf1cfd696f0eeb07d6466aae9d451e (patch) | |
tree | 6171f65e0a2a52d7bcd72fdaae8af33e5956f265 /railties/lib/rails | |
parent | 8833b82df0df699aa0cc97ca1212174f5902697f (diff) | |
download | rails-207fa5c11ddf1cfd696f0eeb07d6466aae9d451e.tar.gz rails-207fa5c11ddf1cfd696f0eeb07d6466aae9d451e.tar.bz2 rails-207fa5c11ddf1cfd696f0eeb07d6466aae9d451e.zip |
Revert "Don't use Rack::Sendfile middleware if x_sendfile_header is not present"
This reverts commit 19ac034bdc9be175eff7cf54208ba14b43d97681.
And allows webservers to configure X-Sendfile-Type.
Closes #11440 thanks to [@MSch]
Conflicts:
railties/lib/rails/application.rb
Diffstat (limited to 'railties/lib/rails')
-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 |