From: Christopher Faulet Date: Fri, 22 Nov 2019 14:34:17 +0000 (+0100) Subject: DOC: Add documentation about the use-service action X-Git-Tag: v2.1.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=579d83b05;p=thirdparty%2Fhaproxy.git DOC: Add documentation about the use-service action The use-service action may be used in tcp-request and http-request rules. It was added to customize HAproxy reply to a client using an applet (initially a lua applet). But the documentation was missing. This patch may be backported as far as 1.6. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 2407fcb01a..55a8fa7280 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4815,6 +4815,21 @@ http-request unset-var() [ { if | unless } ] Example: http-request unset-var(req.my_var) +http-request use-service [ { if | unless } ] + + This directive executes the configured HTTP service to reply to the request + and stops the evaluation of the rules. An HTTP service may choose to reply by + sending any valid HTTP response or it may immediately close the connection + without sending any response. Outside natives services, for instance the + Prometheus exporter, it is possible to write your own services in Lua. No + further "http-request" rules are evaluated. + + Arguments : + is mandatory. It is the service to call + + Example: + http-request use-service prometheus-exporter if { path /metrics } + http-request wait-for-handshake [ { if | unless } ] This will delay the processing of the request until the SSL handshake @@ -9570,6 +9585,7 @@ tcp-request content [{if | unless} ] - unset-var() - silent-drop - send-spoe-group + - use-service They have the same meaning as their counter-parts in "tcp-request connection" so please refer to that section for a complete description. @@ -9656,6 +9672,16 @@ tcp-request content [{if | unless} ] The SPOE group name as specified in the engine configuration. + The "use-service" is used to executes a TCP service which will reply to the + request and stop the evaluation of the rules. This service may choose to + reply by sending any valid response or it may immediately close the + connection without sending anything. Outside natives services, it is possible + to write your own services in Lua. No further "tcp-request" rules are + evaluated. + + Example: + tcp-request content use-service lua.deny { src -f /etc/haproxy/blacklist.lst } + Example: tcp-request content set-var(sess.my_var) src