You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/27 02:03:19 UTC

[GitHub] [apisix] soulbird commented on a diff in pull request #7323: feat(deployment): send the right Host & SNI

soulbird commented on code in PR #7323:
URL: https://github.com/apache/apisix/pull/7323#discussion_r906916703


##########
apisix/conf_server.lua:
##########
@@ -136,13 +138,25 @@ local function pick_node(ctx)
 
         ctx.server_picker = server_picker
         ctx.balancer_server = server
-        res = create_resolved_result(server)
+
+        for _, r in ipairs(resolved_results) do
+            if r.server == server then
+                res = r
+                break
+            end
+        end
     else
         res = resolved_results[1]
     end
 
     ctx.balancer_ip = res.host
     ctx.balancer_port = res.port
+
+    ngx_var.upstream_host = res.domain or res.host
+    if balancer.recreate_request and ngx.get_phase() == "balancer" then
+        balancer.recreate_request()
+    end

Review Comment:
   Why `recreate_request `?



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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