【发布时间】:2016-11-09 12:48:31
【问题描述】:
我的应用程序在 Nginx 和 passenger 服务器上运行。在production.rb 里面我看到一行写着:
# Specifies the header that your server uses for sending files.
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
它如何指定标头来发送文件? Rails 如何在不开启此功能的情况下发送文件?
打开它是个好习惯吗?它是否使我的应用程序运行得更快?
【问题讨论】:
标签: ruby-on-rails ruby nginx server