Skip to content

Instantly share code, notes, and snippets.

@garystafford
Created July 4, 2021 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/96d66791377e79764caf19c002021b52 to your computer and use it in GitHub Desktop.
Save garystafford/96d66791377e79764caf19c002021b52 to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: rev-proxy
spec:
hosts:
- {{ YOUR_API_HOSTNAME_HERE }}
gateways:
- istio-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: rev-proxy.dev.svc.cluster.local
port:
number: 80
weight: 100
corsPolicy:
allowOrigin:
- {{ YOUR_UI_HOSTNAME_HERE }}
allowMethods:
- OPTIONS
- GET
allowCredentials: true
allowHeaders:
- "*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment