Sunday, January 28, 2018

Re: gzip compression and httpd/relayd

> Yes it's possible. Make sure to set the appriopriate HTTP headers aswell
> with relayd: read "Accept-Encoding" and if it's acceptable set
> "Content-Encoding".

Indeed, it works.

relayd.conf :

match response header "Accept-Encoding" value "gzip"
match response header set "Content-Encoding" value "gzip"

Then :

cd /var/www/htdocs/site
gzip style.css && mv style.css.gz style.css

Now, open URL pointing to style.css, and here you go.

However, all your files must be gzipped, or the browser is unhappy.

Thanks a lot.

No comments:

Post a Comment