From 56a86c2191e159448bd2644f105f629c34c85c48 Mon Sep 17 00:00:00 2001 From: wycats Date: Fri, 26 Mar 2010 16:58:55 -0700 Subject: Make X-Sendfile default to "" so it works correctly in dev mode. Provide a default in production.rb that can be modified, so that people who care about sendfile performance in production mode can get better performance easily. --- .../rails/app/templates/config/environments/production.rb.tt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt index 917052c3df..44d739e448 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt @@ -9,6 +9,15 @@ config.consider_all_requests_local = false config.action_controller.perform_caching = true + # Specifies the header that your server uses for sending files + config.action_disaptch.x_sendfile_header = "X-Sendfile" + + # For nginx: + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' + + # If you have no front-end server that supports something like X-Sendfile, + # just comment this out and Rails will serve the files + # See everything in the log (default is :info) # config.log_level = :debug -- cgit v1.2.3