mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-18 19:50:54 +00:00
DOC: configuration: do-resolve doesn't work with a port in the string
Fix the documentation about do-resolve to handle the case where a port is associated to the hostname in the Host header. Must be backported as far as 2.0.
This commit is contained in:
parent
eba9088a7c
commit
1ef2460934
@ -6579,7 +6579,8 @@ http-request do-resolve(<var>,<resolvers>,[ipv4,ipv6]) <expr>
|
|||||||
based on information found in the request (IE a Host header).
|
based on information found in the request (IE a Host header).
|
||||||
If this action is used to find the server's IP address (using the
|
If this action is used to find the server's IP address (using the
|
||||||
"set-dst" action), then the server IP address in the backend must be set
|
"set-dst" action), then the server IP address in the backend must be set
|
||||||
to 0.0.0.0.
|
to 0.0.0.0. The do-resolve action takes an host-only parameter, any port must
|
||||||
|
be removed from the string.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
resolvers mydns
|
resolvers mydns
|
||||||
@ -6594,7 +6595,7 @@ http-request do-resolve(<var>,<resolvers>,[ipv4,ipv6]) <expr>
|
|||||||
|
|
||||||
frontend fe
|
frontend fe
|
||||||
bind 10.42.0.1:80
|
bind 10.42.0.1:80
|
||||||
http-request do-resolve(txn.myip,mydns,ipv4) hdr(Host),lower
|
http-request do-resolve(txn.myip,mydns,ipv4) hdr(Host),lower,regsub(:[0-9]*$,)
|
||||||
http-request capture var(txn.myip) len 40
|
http-request capture var(txn.myip) len 40
|
||||||
|
|
||||||
# return 503 when the variable is not set,
|
# return 503 when the variable is not set,
|
||||||
|
Loading…
Reference in New Issue
Block a user