Permalink
Browse files

Revert "Don't use Rack::Sendfile middleware if x_sendfile_header is n…

…ot present"

This reverts commit 19ac034.
And allows webservers to configure X-Sendfile-Type.

Closes #11440 thanks to [@MSch]

Conflicts:
	railties/lib/rails/application.rb
  • Loading branch information...
1 parent 8833b82 commit 207fa5c11ddf1cfd696f0eeb07d6466aae9d451e @spastorino spastorino committed Jul 15, 2013
Showing with 1 addition and 3 deletions.
  1. +1 −3 railties/lib/rails/application/default_middleware_stack.rb
@@ -20,9 +20,7 @@ def build_stack
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

0 comments on commit 207fa5c

Please sign in to comment.