From 0ed623ae14897b274400468fae4c926dc350c1bd Mon Sep 17 00:00:00 2001 From: kingluo Date: Fri, 24 Mar 2023 14:51:01 +0800 Subject: [PATCH] refine the bugfix --- apisix/upstream.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apisix/upstream.lua b/apisix/upstream.lua index f41364162f5a..416bbea7cfa4 100644 --- a/apisix/upstream.lua +++ b/apisix/upstream.lua @@ -135,7 +135,7 @@ local function create_checker(upstream) local host = upstream.checks and upstream.checks.active and upstream.checks.active.host local port = upstream.checks and upstream.checks.active and upstream.checks.active.port local up_hdr = upstream.pass_host == "rewrite" and upstream.upstream_host - local use_node_hdr = upstream.pass_host == "node" + local use_node_hdr = upstream.pass_host == "node" or nil for _, node in ipairs(upstream.nodes) do local host_hdr = up_hdr or (use_node_hdr and node.domain) local ok, err = checker:add_target(node.host, port or node.port, host,