简体   繁体   English

如何在 Mongrel/WEBrick 服务器上的轨道上从我的 Ruby 输出的所有内容上启用 output 压缩 (gzip)?

[英]How to enable output compression (gzip) on everything that goes out of my Ruby on rails on Mongrel/WEBrick Server?

I am not sure this is the right place to ask this question, as answer to this may be coding solution or a config solution:) any way,我不确定这是问这个问题的正确地方,因为这个问题的答案可能是编码解决方案或配置解决方案:) 无论如何,

I am using ruby 1.8.7 and rails 2.3.11 running on the Mongrel server.我正在使用在 Mongrel 服务器上运行的 ruby 1.8.7 和 rails 2.3.11。 How do i enable the gzip compression on everything (views, data, JS, CSS etc.) that goes out of this server?如何对从该服务器发出的所有内容(视图、数据、JS、CSS 等)启用 gzip 压缩?

I tried google, and most responses say use apache:P but i donot have access to any other web server.我试过谷歌,大多数回复说使用 apache:P 但我无权访问任何其他 web 服务器。 There are no straight answers as to how to get webrick to do this.关于如何让 webrick 做到这一点,没有直接的答案。

Can anyone help me?谁能帮我?

thanks谢谢

You should be able to do this using the Mongrel GZipFilter .您应该可以使用Mongrel GZipFilter来做到这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM