[英]How to enable gzip compression on YAWS?
如何在偏航轴上启用gzip压缩?
我有此信息:
With this patch, Yaws will add 'Accept-Encoding' in 'Vary' header if the
support of gzip compression is enabled or if the response is compressed.
The 'Vary' header can be set using 'yaws:outh_set_vary(Fields)' or by
returning '{header, {vary, Fields}}' from scripts (where Fields is a list
of header names).
问题是我不知道在哪里添加yaws:outh_set_vary(Fields)或如何返回{header,{vary,Fields}}。
最简单的方法是在yaws.conf
配置文件的服务器块中将deflate = true
设置为为该服务器启用deflate压缩。 有关deflate
更多详细信息,请参见Yaws配置文档 ,包括对用于自定义服务器压缩设置的可选<deflate> ... </deflate>
块的说明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.