I think we don’t support this in upstream mode. Generally speaking, it’s super tricky for us to defer the connection state for so long, so this is unlikely to change soon. Sorry!
and it failed with The plain HTTP request was sent to HTTPS port, which I think is the problem of Host: a.com, is there any experience for this problem?
------------ Update -----------------
When I print out the flow.mode inside request, I found that when the client request http the mode is upstream, when the client request is https the mode is transparent, and then it go into the set_server to change the host after the modification of flow.scheme
------------ Update -----------------
I got a request like:
GET http://a.com:443 which result in the The plain HTTP request was sent to HTTPS port error