开发者

Can mod_deflate compress the output depending on the "Host" header in the Request Headers?

开发者 https://www.devze.com 2023-03-23 17:50 出处:网络
Can mod_deflate compress the output depending on the \"Host\" header in the Request Headers? As far as I understand based on the documentation, it is u开发者_JAVA百科sually done by looking at the User

Can mod_deflate compress the output depending on the "Host" header in the Request Headers? As far as I understand based on the documentation, it is u开发者_JAVA百科sually done by looking at the User-Agent etc. in the configuration.

I could not find any example in doc that says -

If Host: header is x.y.z then do compression. Else don't do compression.

Thanks!


From the manual:

Compression is implemented by the DEFLATE filter. The following directive will enable compression for documents in the container where it is placed:

SetOutputFilter DEFLATE 

Didn't test it, but "container" should include "<VirtualHost>", so just place it only in those VHs you want to deliver compressed responses.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号