Host Header Manipulation

I have a Terminating Gateway that sends connect traffic routed to it, to an external source, that essentially operates like a web server, in which it routes based on the host header received as the target.

Since any service communicating with it is essentially talking to localhost to traverse the consul service mesh, there’s no real host header to pass.

I’ve seen a few posts around retaining host headers, but I’m trying to figure out if its possible for the TGW or Envoy to set the Host Header based on the path, i.e., if a service calls localhost:5555/service1, the TGW will send the request to the external source with a configured Host header for anything targeting “/service1*”