mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't use Rack::Sendfile middleware if x_sendfile_header is not present
This commit is contained in:
parent
703d0e05c0
commit
ecd4f0b6ff
1 changed files with 3 additions and 1 deletions
|
@ -163,7 +163,9 @@ module Rails
|
|||
middleware.use ::Rails::Rack::Logger # must come after Rack::MethodOverride to properly log overridden methods
|
||||
middleware.use ::ActionDispatch::ShowExceptions, config.consider_all_requests_local
|
||||
middleware.use ::ActionDispatch::RemoteIp, config.action_dispatch.ip_spoofing_check, config.action_dispatch.trusted_proxies
|
||||
if config.action_dispatch.x_sendfile_header.present?
|
||||
middleware.use ::Rack::Sendfile, config.action_dispatch.x_sendfile_header
|
||||
end
|
||||
middleware.use ::ActionDispatch::Reloader unless config.cache_classes
|
||||
middleware.use ::ActionDispatch::Callbacks
|
||||
middleware.use ::ActionDispatch::Cookies
|
||||
|
|
Loading…
Reference in a new issue