ServiceEntry with multiple dns endpoints and HOST header

Hi everyone,

My team have trouble with Egress Gateway routing to external service backed up by multiple endpoints.

For example we have(simple main config attributes):
kind: ServiceEntry
spec:
endpoints:
- address: some.address1
ports:
http: 2222
- address: some.address2
ports:
http: 1111
hosts:
- synthetic.address
location: MESH_EXTERNAL
resolution: DNS
ports:
- name: http
number: 80
protocol: HTTP

so when our Virtual Service is being called, it setting destination to
synthetic.address

route:

  • destination:
    host: synthetic.address
    port:
    number: 80

and all out request that passed this virtual service is balanced between ServiceEntry endpoints.

BUT endpoints looking at HOST header and expecting it to be SAME as DNS name (some.address1, some.address2 accordingly)

are there any way to do that in istio? (its looking like we need some option for ServiceEntry to rewrite HOST header according to endpoint)