]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: config: fix rfc7239 converter examples
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 30 May 2023 07:47:53 +0000 (09:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 30 May 2023 08:34:05 +0000 (10:34 +0200)
Some rfc7239 converter examples were not working and thus were misleading.
Fixing rfc7239_n2nn and rfc7239_n2np usage examples.

As both converters were introduced in 2.8, no backport needed.

doc/configuration.txt

index 5f8474adf38b9639678291e709977aff658fbffe..2fbd3c50de1e1ae0d9d0c8ce50a8814c6d84b926 100644 (file)
@@ -17751,10 +17751,12 @@ rfc7239_n2nn
     # extract 'for' field from forwarded header, extract nodename from
     # resulting node identifier and store the result in req.fnn
     http-request set-var(req.fnn) req.hdr(forwarded),rfc7239_field(for),rfc7239_n2nn
-    #input: "for=\"127.0.0.1:9999\""
-    #  output: 127.0.0.1
-    #input: "for=\"_name:_port\""
-    #  output: "_name"
+    #input: "127.0.0.1:9999"
+    #  output: 127.0.0.1 (ipv4)
+    #input: "[ab:cd:ff:ff:ff:ff:ff:ff]:9998"
+    #  output: ab:cd:ff:ff:ff:ff:ff:ff (ipv6)
+    #input: "_name:_port"
+    #  output: "_name" (string)
 
 rfc7239_n2np
   Converts RFC7239 node (provided by 'for' or 'by' 7239 header fields)
@@ -17767,9 +17769,11 @@ rfc7239_n2np
     # resulting node identifier and store the result in req.fnp
     http-request set-var(req.fnp) req.hdr(forwarded),rfc7239_field(by),rfc7239_n2np
     #input: "by=\"127.0.0.1:9999\""
-    #  output: 9999
-    #input: "by=\"_name:_port\""
-    #  output: "_port"
+    #  output: 9999 (integer)
+    #input: "[ab:cd:ff:ff:ff:ff:ff:ff]:9998"
+    #  output: 9998 (integer)
+    #input: "_name:_port"
+    #  output: "_port" (string)
 
 add(<value>)
   Adds <value> to the input value of type signed integer, and returns the