Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
ENV["USE_OPTIMIZED_JS"] = "true"

# Specifies the header that your web server uses for directly sending files
# If you have mod_xsendfile enabled in apache:
# config.action_dispatch.x_sendfile_header = 'X-Sendfile'
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have mod_xsendfile enabled in apache/nginx:
config.action_dispatch.x_sendfile_header =
case ENV["WEB_SERVER_X_SENDFILE_HEADER"]
when "apache"
"X-Sendfile"
when "nginx"
"X-Accel-Redirect"
else
nil
end

# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
Expand Down