This is an automated email from the ASF dual-hosted git repository.
monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 508b73ccc fix: host_hdr should not be false (#9150)
508b73ccc is described below
commit 508b73ccc7321968456db934d95c0f338189d0a5
Author: jinhua luo <[email protected]>
AuthorDate: Thu Mar 30 00:29:22 2023 +0800
fix: host_hdr should not be false (#9150)
---
apisix/upstream.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apisix/upstream.lua b/apisix/upstream.lua
index f41364162..416bbea7c 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,