Enable CORS Access-Control-Allow-Origin in AEM6.1 | Community
Skip to main content
ravisharma3588
New Participant
Aug 25, 2016 7:02 AM UTC

Enable CORS Access-Control-Allow-Origin in AEM6.1

Hi,

I am trying to expose the AEM content via REST API by using osgi-jax-rs-connector. I am successfully able to expose the REST endpoint under services.

I am trying to consume this REST endpoint from an angular application hosted on Tomcat server 9.0 but I getting Access-Control-Allow-Origin header not set error in my browser.

Does anybody know how to enable CORS in AEM or have any idea around it ?

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

3 replies

MaxBarrass
Level 3
Jul 3, 2017 8:27 AM UTC
New Participant
May 29, 2018 3:42 PM UTC

So Is there any solution for AEM 6.1 that you aware of?

Translate
Level 4
Aug 25, 2016 1:26 PM UTC

This used to be solved by creating the appropriate cross-domain.xml in the web-war descriptor files.

There seems to be some header values you can set to allow the communication:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

Translate