Why lua script on the http-response triggered twice?

For some reason I see double output of a lua func in the haproxy log. Imo, this mean the func triggered twice. Is it a normal behaviour ? Is it possible to avoid double func call ?
Haproxy version - 2.4
log /dev/log local0 debug
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
ca-base /etc/ssl/certs
crt-base /etc/ssl/private

ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
lua-load /etc/haproxy/lua/register.lua
log global
mode http
option httplog
option dontlognull
option log-health-checks
timeout connect 5000
timeout client 50000
timeout server 50000

frontend stats
bind :11404
stats enable
stats uri /
stats refresh 10s

frontend a_cluster
bind *:10080
filter spoe engine request-cache config /etc/haproxy/request-cache.conf
http-request wait-for-body time 1s at-least 10k
http-request lua.pre_node_rp_route rp_cluster_nodes
http-response lua.post_rp_route rp_cluster_nodes
default_backend rp_cluster_nodes
option forwardfor header X-Real-IP

backend rp_cluster_nodes
option httpchk
http-check send meth GET uri /actuator/rphealth
http-check expect string “{“status”:“UP”}”
balance hdr(“X-Selected-Node”)
server node_01 ssl verify none check port 8081 check-ssl verify none inter 5000
server node_02 ssl verify none check port 8081 check-ssl verify none inter 5000
server node_03 ssl verify none check port 8081 check-ssl verify none inter 5000

backend agent
mode tcp
balance roundrobin
timeout connect 5s # greater than hello timeout
timeout server 3m # greater than idle timeout
option spop-check
server iye check


local function post_rp_route(txn, cluster_name)
core.Info(“Headers :” … txn:get_var(“txn.request_cacher.hdrs”))

core.register_action(“post_rp_route”, {‘http-res’}, post_rp_route, 1)


May 19 07:53:47 testnginxrp haproxy[120999]: Headers :.x-terminal-id.1234567890.authorization.Basic XXXXXXXXXX=.content-type.application/json.user-agent.PostmanRuntime/7.29.0.accept./.cache-control.no-cache.postman-token$e64c3f99-b923-4397-b473-768ddf714973.host., deflate, br.content-length.1373
May 19 07:53:47 testnginxrp haproxy[120999]: [19/May/2022:07:53:46.986] rp_cluster rp_cluster_nodes/node_02 4/0/64/51/119 403 440 - - ---- 1/1/0/0/0 0/0 “POST /api/v1/transfer HTTP/1.1”
May 19 07:53:47 testnginxrp haproxy[120999]: [info] 138/075347 (120999) : Headers :.x-terminal-id.1234567890.authorization.Basic XXXXXXXXXX=.content-type.application/json.user-agent.PostmanRuntime/7.29.0.accept./.cache-control.no-cache.postman-token$e64c3f99-b923-4397-b473-768ddf714973.host., deflate, br.content-length.1373

It is not doubled call. It is some logging specific.