MINOR: httpclient/lua: add 'dst' optionnal field

The 'dst' optionnal field on a httpclient request can be used to set an
alternative server address in the haproxy address format. Which means it
could be use with unix@, ipv6@ etc.

Should fix issue #1471.
This commit is contained in:
William Lallemand
2022-02-17 20:00:23 +01:00
parent 7b2e0ee1c1
commit 4f4f2b7b5f
4 changed files with 19 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ local function cron()
core.Info("Third httpclient request")
local httpclient3 = core.httpclient()
local response3 = httpclient3:get{url="http://127.0.0.1:" .. vtc_port3, headers={ [ "Host" ] = { "foobar.haproxy.local" } }}
local response3 = httpclient3:get{url="http://127.0.0.1", dst = vtc_port3, headers={ [ "Host" ] = { "foobar.haproxy.local" } }}
end