diff options
author | wycats <wycats@gmail.com> | 2010-03-26 16:58:55 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-26 16:58:55 -0700 |
commit | 56a86c2191e159448bd2644f105f629c34c85c48 (patch) | |
tree | b7cef99faf30be7f289fdb8f786af54be67cfe74 /railties/lib | |
parent | 197904341f2b2f21d69c653cede3aec124e86720 (diff) | |
download | rails-56a86c2191e159448bd2644f105f629c34c85c48.tar.gz rails-56a86c2191e159448bd2644f105f629c34c85c48.tar.bz2 rails-56a86c2191e159448bd2644f105f629c34c85c48.zip |
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.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt | 9 |
1 files changed, 9 insertions, 0 deletions
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 |