feat: multiple-cors-allow-origin support (#7134)

This commit is contained in:
Alex Zhang 2021-05-24 00:13:39 +08:00 committed by GitHub
parent f6dbd93865
commit 8a55801cc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 7 deletions

View file

@ -348,10 +348,10 @@ CORS can be controlled with the following annotations:
- Example: `nginx.ingress.kubernetes.io/cors-expose-headers: "*, X-CustomResponseHeader"`
* `nginx.ingress.kubernetes.io/cors-allow-origin`
controls what's the accepted Origin for CORS.
This is a single field value, with the following format: `http(s)://origin-site.com` or `http(s)://origin-site.com:port`
controls which Origin(s) are allowed for CORS.
This is a multi-valued field, separated by ',', each value should obey the following format: `http(s)://origin-site.com` or `http(s)://origin-site.com:port`
- Default: `*`
- Example: `nginx.ingress.kubernetes.io/cors-allow-origin: "https://origin-site.com:4443"`
- Example: `nginx.ingress.kubernetes.io/cors-allow-origin: "https://origin-site.com:4443, https://origin-site-2.com"`
* `nginx.ingress.kubernetes.io/cors-allow-credentials`
controls if credentials can be passed during CORS operations.