[英]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.