zll600 commented on code in PR #10989:
URL: https://github.com/apache/apisix/pull/10989#discussion_r1510951130


##########
apisix/init.lua:
##########
@@ -576,6 +576,13 @@ end
 
 
 function _M.http_access_phase()
+    if ngx.req.http_version() == 3 then
+        local upstream_host = ngx.var.host
+        if ngx.var.server_port then
+            upstream_host = upstream_host .. ":" .. ngx.var.server_port
+        end
+        ngx.var.upstream_host = upstream_host
+    end

Review Comment:
   For http3, the `http_post` variable will be empty which is used to [set 
`$upstream_host`](https://github.com/apache/apisix/blob/d6a3db3ee2738436a634c3a6addd02c9cdfca035/apisix/cli/ngx_tpl.lua#L722).
 But because http/1.1 is used between apisix and upstream, `upstream_host` 
needs to be set manually here.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to