Encountering CORS Issue on Publisher Environment with Asset Share Commons Email Service | Community
Skip to main content
MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 31, 2023
Solved

Encountering CORS Issue on Publisher Environment with Asset Share Commons Email Service

  • July 31, 2023
  • 2 replies
  • 900 views

Hi,

 

I am reaching out regarding an issue we are experiencing with sending assets via email. Unfortunately, we are encountering a CORS problem in console, which prevents us from successfully mailing the assets. We are using asset share commons for assets management but in author email service is working on but on publisher it is giving CORS issue. We have already updated all the necessary configurations and dispatcher updates but still getting same error. Interestingly, we faced the same problem on both the DEV and QA environments. However, we managed to resolve the issue on the DEV environment, yet the problem persists on the QA environment, even though the code remains consistent across both environments.

I have extensively referred to relevant documentation to find a solution, but so far, it hasn't led to the desired outcome. We would greatly appreciate any insights or suggestions you might have to help us resolve this issue.

 

 

 

 

Error

 

Access to XMLHttpRequest at 'https://publish-p32424-e4422331.adobeaemcloud.com/content/asset-share-commons/en/dark/actions/share/_jcr_content/root/responsivegrid/share.share.html' from origin 'https://publish-p34252-e153243.adobeaemcloud.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/security/understand-cross-origin-resource-sharing.html?lang=en

https://opensource.adobe.com/asset-share-commons/pages/actions/share/

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MayurSatav

[FIXED]

 

The problem has been solved by adding a resource map configuration within /etc/map.publish.dev for the secondary development environment.

2 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 31, 2023

Did you include the "OPTIONS" and "HEAD" methods in the Adobe Granite Cross-Origin Resource Sharing Policy OSGi configuration on this'https://publish-p52502-e455322.adobeaemcloud.com' server? Can you share how your configuration is being set?

Esteban Bustamante
MayurSatav
Community Advisor and Adobe Champion
MayurSatavCommunity Advisor and Adobe ChampionAuthorAccepted solution
Community Advisor and Adobe Champion
August 16, 2023

[FIXED]

 

The problem has been solved by adding a resource map configuration within /etc/map.publish.dev for the secondary development environment.

Mayur Satav | www.mayursatav.in