juzhiyuan commented on a change in pull request #2132:
URL: https://github.com/apache/apisix/pull/2132#discussion_r479698324



##########
File path: apisix/init.lua
##########
@@ -297,6 +300,32 @@ local function return_direct(...)
 end
 
 
+local function set_upstream_host(api_ctx)
+    local pass_host = api_ctx.pass_host
+    if pass_host and pass_host ~= "pass" then

Review comment:
       How about check pass_host directly? Because there has no logics to 
handle the case when pass_host doesn’t exist 🤔
   
   ```lua
   local host
   
   If pass_host == “xx” then
      xxx
   
   If pass_host == “xx” then
     xxx
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to