Enable CORS configuration
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 1.2k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 2
Description
## In what area(s)?
/area networking
## Describe the feature
We should enable Cross-Origin Resource Sharing (CORS) configuration in `ksvc`’s annotations
Reconciler reconcile CORS info from `ksvc (annotations)` to `virtualservice`: `ksvc(annotations) -> route(annotations) -> kingress( Entity spec) -> virtualservice `
we can config by doing that:
* Configurations set in `config-domain` for default
* Configuration set in `ksvc` or `route` for each service
Fields included listed as follows, like istio [Corspolicy](https://istio.io/latest/docs/reference/config/networking/virtual-service/#CorsPolicy)
```yaml
corsPolicy:
allowOrigins:
- exact: https://example.com
allowMethods:
- POST
- GET
allowCredentials: false
allowHeaders:
- X-Foo-Bar
maxAge: "24h"
```
Contributor guide
Assessment
This issue has not been assessed yet.