Hi All,
We have a requirement to support multiple different domains that will be consuming content from AEM using GraphQL APIs.
The problem that we are facing is that the response is caching the "Access-Control-Allow-Origin" headers which is causing the below scenario.
Suppose, I hit the AEM GraphQL endpoint from "domainA", AEM sends "Access-Control-Allow-Origin: domainA" as part of the response which is cached.
Now, when I hit the AEM GraphQL endpoint from "domainB", the cached response with "Access-Control-Allow-Origin: domainA" gets returned instead of "Access-Control-Allow-Origin: domainB" which causes CORS issue.
Is there a way to vary the response based on the origin for the GraphQL endpoint?
Thanks,
Ram