MINOR: http_ext: add rfc7239_n2np converter
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 30 Dec 2022 15:56:08 +0000 (16:56 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Jan 2023 14:18:59 +0000 (15:18 +0100)
commit9a273b4069875565b36e0ab58ddd29ff4736d3a8
tree987176d54c6a7391063153623ea1ddfe8301b2ac
parent07d6753c89b9e00b67f7dfb93dbfcfe5bf6259b5
MINOR: http_ext: add rfc7239_n2np converter

Adding new http converter: rfc7239_n2np.

Takes a string representing 7239 forwarded header node (extracted from
either 'for' or 'by' 7239 header fields) as input and translates it
to either unsigned integer or ('_' prefixed obfuscated identifier),
according to 7239RFC.

  Example:
    # extract 'by' field from forwarded header, extract node port from
    # 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"

Depends on:
  - "MINOR: http_ext: introduce http ext converters"
doc/configuration.txt
src/http_ext.c