コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

CORS Error

Avatar

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.

 

Requirement:

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 "*"

arvind_0-1684750447154.png

 

 

 

 

1 受け入れられたソリューション

Avatar

正解者
Community Advisor
3 返信

Avatar

Community Advisor

Avatar

正解者
Community Advisor

Hello @arvind 

 

Please validate the clientheaders section as per below document:

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/security/develop-for-cro... 

 

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

 


Aanchal Sikka

Avatar

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