什么 Rails 模块或 gem 会设置默认响应 headers?

What Rails module or gem does set default response headers?

对于空 Rails 应用程序,我将 Cache-Control 默认设置为 max-age=0, private, must-revalidate

我想更好地理解这个过程,所以我试图检测执行此工作的代码。

我检查了 actionpackrake middlewareconfig.action_dispatch.default_headersinitializers and envinronment configs

我正在使用 Rails 4.2,nginx 作为 Web 服务器,Passenger 作为应用程序服务器。

可能这是一些机架中间件或应用程序服务器本身。

Rack::ETag 设置默认 Cache-Control header.