Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

CORS Header issue || AEM Salesforce Integration by leveraging Lighting Out

sagarv13144480
Level 3
Level 3

Hi All,

 

We have made necessary changes in Adobe Cross Origin Sharing Configuration policy in configMgr.

 

Also we have added "Access-Control-Allow-Origin" in headers file under dispatcher.any but we are still facing this below issue. when we try to hit the java script of salesforce component from aem.

 

Access to XMLHttpRequest at 'https://xxxxxxxx.com/c/createClassLightningOut.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT' from origin 'xxAEM DEV AUTHORxxx.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

 

 

Thanks,

Sagar

1 Accepted Solution
shreyag72517995
Correct answer by
Employee
Employee

This issue was solved through daycare ticket. The issue was at salesforce side and some white-listing was needed to done at their end.

View solution in original post

0 Replies
jbrar
Employee
Employee

I would recommend checking if the dispatcher is caching the "Access-Control-Allow-Origin" header. Might be an invalid header cached.

 

Also, you can setup a DEBUG logger on "com.adobe.granite.cors" to check for more details about the failure.

 

More troubleshooting steps at [1]

 

[1] https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/security/understand-cross...

sagarv13144480
Level 3
Level 3
When checked in cors log file no error or issue was detected and also when checked via curl commands we can see the header file present for the domain, but somehow when page is loading that header is not present
a74048191r
Level 2
Level 2
we've experienced a similar CORS issue with Salesforce in the past....is the 'Access-Control-Allow-Origin' response header set on the Salesforce side? https://developer.salesforce.com/docs/atlas.en-us.mc-programmatic-content.meta/mc-programmatic-conte...
Arun_Patidar
Community Advisor
Community Advisor

Hi You have to make CORS changes in salesforce server in order to use their script in your application.

shreyag72517995
Correct answer by
Employee
Employee

This issue was solved through daycare ticket. The issue was at salesforce side and some white-listing was needed to done at their end.

View solution in original post