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

Avatar

Avatar
Validate 1
Level 2
sagarv13144480
Level 2

Likes

7 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
sagarv13144480
Level 2

Likes

7 likes

Total Posts

26 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
sagarv13144480
Level 2

09-04-2020

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back
Employee
shreyag72517995
Employee

Likes

7 likes

Total Posts

9 posts

Correct reply

5 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 1
Affirm 5
View profile

Avatar
Give Back
Employee
shreyag72517995
Employee

Likes

7 likes

Total Posts

9 posts

Correct reply

5 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 1
Affirm 5
View profile
shreyag72517995
Employee

23-04-2020

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

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,329 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,329 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

10-04-2020

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

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

390 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

390 likes

Total Posts

869 posts

Correct reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

09-04-2020

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...