Hi,

Le mer. 2 avr. 2025 à 09:10, Christopher Faulet <cfau...@haproxy.com> a
écrit :

> In fact, in your case, it is expected to have no compression. You abort
> the
> request analysis, skipping this way the response analysis. It is
> equivalent to
> what happens with an "http-request deny". The compression is performed
> during
> the response analysis.
>
> To be able to compress a response returned from a lua script, you must use
> a
> service instead of an action that aborts the request. A lua service is an
> applet
> that is equivalent to a server. So the response analysis is performed and
> the
> response is no limited to one buffer. To do so, you must use the
> "use-service"
> action.
>


Unfortunately, I need to use an action in this case because I want the
original backend to be called if my action does not return txn:done().
I also looked at implementing gzip compression at lua level but even if it
works locally, It's quite difficult to package gzip support to official
docker images used in kubernetes ingress controller.

Thanks for the explanation though !

Olivier

Reply via email to