On 2018-01-28, Thuban <[email protected]> wrote:
>  
>> 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.
>
>

Fun hack, but it's going to break for a browser that doesn't support gzip.
Also it's a nice trap for the next admin that comes along (which may be your
future self :)


Reply via email to