mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
DOC: config: fix rfc7239 converter examples
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.
This commit is contained in:
parent
8fc7073906
commit
ac456abc37
@ -17751,10 +17751,12 @@ rfc7239_n2nn
|
|||||||
# extract 'for' field from forwarded header, extract nodename from
|
# extract 'for' field from forwarded header, extract nodename from
|
||||||
# resulting node identifier and store the result in req.fnn
|
# resulting node identifier and store the result in req.fnn
|
||||||
http-request set-var(req.fnn) req.hdr(forwarded),rfc7239_field(for),rfc7239_n2nn
|
http-request set-var(req.fnn) req.hdr(forwarded),rfc7239_field(for),rfc7239_n2nn
|
||||||
#input: "for=\"127.0.0.1:9999\""
|
#input: "127.0.0.1:9999"
|
||||||
# output: 127.0.0.1
|
# output: 127.0.0.1 (ipv4)
|
||||||
#input: "for=\"_name:_port\""
|
#input: "[ab:cd:ff:ff:ff:ff:ff:ff]:9998"
|
||||||
# output: "_name"
|
# output: ab:cd:ff:ff:ff:ff:ff:ff (ipv6)
|
||||||
|
#input: "_name:_port"
|
||||||
|
# output: "_name" (string)
|
||||||
|
|
||||||
rfc7239_n2np
|
rfc7239_n2np
|
||||||
Converts RFC7239 node (provided by 'for' or 'by' 7239 header fields)
|
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
|
# resulting node identifier and store the result in req.fnp
|
||||||
http-request set-var(req.fnp) req.hdr(forwarded),rfc7239_field(by),rfc7239_n2np
|
http-request set-var(req.fnp) req.hdr(forwarded),rfc7239_field(by),rfc7239_n2np
|
||||||
#input: "by=\"127.0.0.1:9999\""
|
#input: "by=\"127.0.0.1:9999\""
|
||||||
# output: 9999
|
# output: 9999 (integer)
|
||||||
#input: "by=\"_name:_port\""
|
#input: "[ab:cd:ff:ff:ff:ff:ff:ff]:9998"
|
||||||
# output: "_port"
|
# output: 9998 (integer)
|
||||||
|
#input: "_name:_port"
|
||||||
|
# output: "_port" (string)
|
||||||
|
|
||||||
add(<value>)
|
add(<value>)
|
||||||
Adds <value> to the input value of type signed integer, and returns the
|
Adds <value> to the input value of type signed integer, and returns the
|
||||||
|
Loading…
Reference in New Issue
Block a user