Is it possible to implement an EnvoyFilter for a out-going request?

Hi,

I have implemented an EnvoyFilter for one of my services by following this sample. Now I want to implement a similar one, but it is for a service that is out of my control.

Current request flow is like this:

  1. browser send request
  2. istio ingress receive the request
  3. the request is routed to the 3rd party service in the cluster, but does not have istio-proxy sidecar

I need to inject some headers at step 3 before routing the request to the other services. The header content is dynamic, and I need to make some HTTP requests to get the content.

Is there’s a filter that can do this? Or it is simply impossible with Istio?

Thanks