Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在带有 Nginx 的 Phusion Passenger 上使用 Sinatra 部署一个应用程序。如果我想在我的静态内容(例如样式表)上设置 Expires 标头,我似乎可以在三个地方完成此操作。
以下哪种方法是设置 HTTP 标头的最佳位置?
在交谈并回答了这个问题并看到上面的评论之后,我想我已经找到了自己问题的答案。
nginx 的全部要点实际上删除了前两个选项。
这导致选项#3。这是设置所有其他内容配置的地方,例如 gzip 压缩。