]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: hlua: Add support for the "http-after-res" action
authorSébastien Gross <sgross@haproxy.com>
Wed, 13 Sep 2023 09:51:59 +0000 (05:51 -0400)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 21 Sep 2023 14:31:20 +0000 (16:31 +0200)
commit6a9ba853221e42adcdb2aead8c59f898e2769ab0
tree58ba7e8f54b8a808787cd51cdf654f7928d7d62c
parent95c4d24825b64df03e20559b8d79eea11f1f52d0
MINOR: hlua: Add support for the "http-after-res" action

This commit introduces support for the "http-after-res" action in
hlua, enabling the invocation of a Lua function in a
"http-after-response" rule. With this enhancement, a Lua action can be
registered using the "http-after-res" action type:

    core.register_action('myaction', {'http-after-res'}, myaction)

A new "lua.myaction" is created and can be invoked in a
"http-after-response" rule:

    http-after-response lua.myaction

This addition provides greater flexibility and extensibility in
handling post-response actions using Lua.

This commit depends on:
 - 4457783 ("MINOR: http_ana: position the FINAL flag for http_after_res execution")

Signed-off-by: Sébastien Gross <sgross@haproxy.com>
doc/lua-api/index.rst
src/hlua.c