apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: helloworld-vs
spec:
  hosts:
    - "*"
  gateways:
    - helloworld-gateway
  http:
    - name: http-external-service
      timeout: 3s
      match:
        - uri:
            exact: "/external"
      route:
        - destination:
            host: info.cern.ch
            port:
              number: 80
      rewrite:
        uri: "/"
      headers:
        request:
          set:
            HOST: "info.cern.ch"

    - name: https-external-service-without-headers
      timeout: 3s
      match:
        - uri:
            exact: "/external-noh"
      route:
        - destination:
            host: info.cern.ch
            port:
              number: 80
      rewrite:
        uri: "/"