Path rewrite in VirtualService breaks API

Hello,

I am trying to set up an API with Istio !

I want to do path-based routing on the VirtualService by doing the following configuration :

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: deployml
spec:
  hosts:
  - "*"
  gateways:
  - deployml-gateway
  http:
  - match:
    - uri:
        prefix: "/v1/deployml/"
    rewrite:
      uri: "/"
    route:
    - destination:
        host: deployml.test.svc.cluster.local
        port:
          number: 8000

However when I do the following configuration, my API breaks because it cannot find another local route.

For example when I try to get the following page : http://kubernetes.docker.internal/v1/deployml/redoc it then triggers a request to http://kubernetes.docker.internal/openapi.json (which does not exist) instead of http://kubernetes.docker.internal/v1/deployml/openapi.json

Is there a way to pass headers to the service in order to pass the full URI to the container ?

Thank you in advance for your help !