Replies: 1 comment
-
|
I think you'd be able to do this by 2 routes that match on the specific Origin header you want the policy for? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a custom HTTP proxy service that proxies to various microservices and we are trying to replace it with Istio (which we already use for other things). One thing that this custom service does is set CORS-related headers, and it looks like we should be able to move this into Istio as well (to handle CORS entirely in Istio instead of pushing it into each separate microservice).
However, currently the CORS configuration for this domain is that when accessed from some origins, credentials are allowed to be sent, and when accessed from other origins, credentials cannot be sent.
Is it possible to implement this with Istio? It looks to me like for a given
CorsPolicy, you can only setallowCredentialsto a single bool β it can't vary for the differentallowOriginsentries. And eachHTTPRoutecan only have a singleCorsPolicy. Finally, I think this can't just be done by having twoHTTPRouteswith identicalmatchandrouteand differentcorsPolicy, as only the first matching route will be used.If I need this semantics for my services' CORS policies, do I really need to either push them into every microservice (which aren't even all in the same language/ecosystem), or put some other proxy in between Istio and the microservices?
Beta Was this translation helpful? Give feedback.
All reactions