Dealing with CORS using the Contour Kubernetes Ingress

4/15/2020

Given that CORS support in the Contour Ingress currently is in the "parking lot" (https://github.com/projectcontour/contour/issues/437), what is the best way to allow CORS requests at this time?

My particular use case is hosting a GRPC service, which envoy reverse proxies. Conveniently, contour also supports GRPC web out-of-the-box, which we'd like to use for our web service. However, given that CORS are not supported, we cannot do cross-domain requests. Apart from making our web app use the same domain as the GRPC api, is there any other solution that could fill our need at the moment?

Basically, we'd want the envoy to be configured very similarly to the GRPC web example config: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/envoy.yaml.

Thanks!

-- Hannes Lohmander
contour
grpc-web
kubernetes
kubernetes-ingress

0 Answers