istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/testdata/config/rule-default-route-cors-policy.yaml (about) 1 apiVersion: networking.istio.io/v1alpha3 2 kind: ServiceEntry 3 metadata: 4 name: cors 5 namespace: testns 6 spec: 7 hosts: 8 - cors.test.istio.io 9 ports: 10 - number: 80 11 name: http 12 protocol: HTTP 13 resolution: STATIC 14 endpoints: 15 - address: 127.0.0.2 16 ports: 17 http: 7072 18 --- 19 apiVersion: networking.istio.io/v1alpha3 20 kind: VirtualService 21 metadata: 22 name: cors 23 namespace: testns 24 spec: 25 hosts: 26 - cors.test.istio.io 27 http: 28 - route: 29 - destination: 30 host: cors.test.istio.io 31 corsPolicy: 32 allowOrigins: 33 - exact: http://foo.example 34 allowMethods: 35 - POST 36 - GET 37 - OPTIONS 38 allowHeaders: 39 - content-type 40 exposeHeaders: 41 - x-custom-header 42 maxAge: 300s 43 allowCredentials: true