apiVersion: networking.istio.io/v1 kind: VirtualService metadata: name: vs-cde-api namespace: documentations spec: hosts: - ${HOST_PLATFORM} gateways: - default/platform-gateway http: - match: - uri: prefix: /documentations/v2/ rewrite: uri: /external/v2/ corsPolicy: &id001 allowOrigins: - exact: https://${HOST_PLATFORM} - exact: https://${HOST_DOCUMENT_LINK} allowMethods: - GET - POST - PUT - DELETE - PATCH - OPTIONS - HEAD allowHeaders: - Authorization - Content-Type - Identity - Range - Cache-control allowCredentials: true maxAge: 24h route: - destination: host: cde-api.documentations.svc.cluster.local port: number: 8000 - match: - uri: prefix: /cde/app/ rewrite: uri: /app/ corsPolicy: *id001 route: - destination: host: cde-api.documentations.svc.cluster.local port: number: 8000