Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

CORS Error


Level 6

Hello Team,


We have added one JSON file in our dam at below path:

/content/dam/mysite/file.json which is holding some JSON content.

so when we call it from our endsite domain i.e. https://mysite.com/content/dam/mysite/file.json, It give me response.



There is other application hosted using Other Domain.

e.g. https://otherdomain.com , from this domain, they are trying to make call to this url "https://mysite.com/content/dam/mysite/file.json," and they get CORS error in Network. Something as below:

How can we solve this problem? something at dispatcher level, we need to? because in CORS cofiguration in AEM publish, we have allowed domain as "*"






1 Accepted Solution


Correct answer by
Community Advisor
3 Replies


Correct answer by
Community Advisor

Hello @arvind 


Please validate the clientheaders section as per below document:



For troubleshooting CORS, please refer to Understand Cross-Origin Resource Sharing (CORS) with AEM | Adobe Experience Manager


Aanchal Sikka


Level 6

Hi @aanchal-sikka  @Vijay_Katoch   


Thanks for your kind reply.


I added below line in virtual host and It fixed the issue:


SetEnvIf Origin "https://otherdomain.com" cors
Header set Access-Control-Allow-Origin " https://otherdomain.com" env=cors