My application runs on a Nginx and passenger server. Inside the
# Specifies the header that your server uses for sending files.
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
The behavior is explained in the
You should use this option, it will make your application faster and it is good practice to do so.
If you don't use this option, the file will be read by the ruby process, sent to nginx and the to then client.