Permalink
Browse files

make send_file work with nginx

  • Loading branch information...
1 parent 3a9d976 commit 4a97b9c1f9c1d77ce45515dcf81935e278e8de32 @knewter committed Mar 9, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 config/environment.rb
  2. +2 −2 config/environments/production.rb
View
@@ -6,4 +6,4 @@
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance_tag|
"<span class='field_with_errors'>#{html_tag}</span>".html_safe
-end
+end
@@ -10,10 +10,10 @@
config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files
- config.action_dispatch.x_sendfile_header = "X-Sendfile"
+ #config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+ 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

0 comments on commit 4a97b9c

Please sign in to comment.