我已经在 heroku 上的新 cedar 堆栈上部署了一个 rails 3.1 应用程序。新堆栈不会自动提供 gzipping,所以我添加了
use Rack::Deflater
在我的config.ru
使用以下命令通过 curl 对其进行测试:
curl -i -H 'Accept-Encoding: gzip,deflate' http://carbuzz-production.herokuapp.com
返回一个标题content encoding
gzip
和一个看起来压缩的正文。在 Firefox 或 chrome 中打开页面会显示未翻译的正文(大量乱码)。
知道如何解决这个问题吗?