apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: <<appenv>>fe-static
  namespace: <<appenv>>frontend-static
spec:
  hosts:
  - <<SITES>>
  gateways:
  - <<appenv>>fe-static-gateway
  http:
  - match:
    - uri:
        prefix: /events/<<appenv>>fe-static-update
    route:
    - destination:
        host: <<appenv>>fe-static
        port:
          number: 9080
  - match:
    - uri:
        exact: /
    route:
    - destination:
        host: <<landingurl>>
        port:
          number: 80
      headers:
        request:
          set:
            X-Forwarded-Port: "443"
  - match:
    - uri:
        prefix: /personalizations
    route:
    - destination:
        host: <<landingurl>>
        port:
          number: 80
      headers:
        request:
          set:
            X-Forwarded-Port: "443"
  - match:
    - uri:
        prefix: /optin
    route:
    - destination:
        host: <<landingurl>>
        port:
          number: 80
      headers:
        request:
          set:
            X-Forwarded-Port: "443"
  - route:
    - destination:
        host: <<appenv>>fe-static
        port:
          number: 80