55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
apiVersion: networking.istio.io/v1
|
|
kind: VirtualService
|
|
metadata:
|
|
name: vs-cde-api
|
|
namespace: documentations
|
|
spec:
|
|
hosts:
|
|
- srx.wb.ru
|
|
- lk.srx.wb.ru
|
|
gateways:
|
|
- istio-system/main-gateway
|
|
http:
|
|
- match:
|
|
- uri:
|
|
prefix: /documentations/v2/
|
|
rewrite:
|
|
uri: /external/v2/
|
|
corsPolicy: &id001
|
|
allowOrigins:
|
|
- exact: https://srx.wb.ru
|
|
- exact: https://lk.srx.wb.ru
|
|
- exact: https://document-link-srx.wb.ru
|
|
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
|